Comments (10)
I believe test.py
should work after you add import google.oauth2
.
from google-auth-library-python.
Can you please share the output after running which python
?
Please also try running python -m pip install google-auth
.
Please also check if the path that you see after running which python
appears in in the output of this command
import sys
sys.path
from google-auth-library-python.
from google-auth-library-python.
Sorry about that. where python
may work , as which python
is for unix.
Please also try running
python -c "import os, sys; print(os.path.dirname(sys.executable))"
Also try:
python -m pip install google-auth --ignore-installed
from google-auth-library-python.
from google-auth-library-python.
@clundin25 Do you have availability to reproduce the issue in Windows Power Shell?
from google-auth-library-python.
I was not able to reproduce.
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
PS C:\Users\clundin> python --version
Python 3.12.0
PS C:\Users\clundin> python -m pip install google-auth
Collecting google-auth
Downloading google_auth-2.24.0-py2.py3-none-any.whl.metadata (4.7 kB)
Collecting cachetools<6.0,>=2.0.0 (from google-auth)
Obtaining dependency information for cachetools<6.0,>=2.0.0 from https://files.pythonhosted.org/packages/a2/91/2d843adb9fbd911e0da45fbf6f18ca89d07a087c3daa23e955584f90ebf4/cachetools-5.3.2-py3-none-any.whl.metadata
Downloading cachetools-5.3.2-py3-none-any.whl.metadata (5.2 kB)
Collecting pyasn1-modules>=0.2.1 (from google-auth)
Downloading pyasn1_modules-0.3.0-py2.py3-none-any.whl (181 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 181.3/181.3 kB 2.7 MB/s eta 0:00:00
Collecting rsa<5,>=3.1.4 (from google-auth)
Downloading rsa-4.9-py3-none-any.whl (34 kB)
Collecting pyasn1<0.6.0,>=0.4.6 (from pyasn1-modules>=0.2.1->google-auth)
Obtaining dependency information for pyasn1<0.6.0,>=0.4.6 from https://files.pythonhosted.org/packages/d1/75/4686d2872bf2fc0b37917cbc8bbf0dd3a5cdb0990799be1b9cbf1e1eb733/pyasn1-0.5.1-py2.py3-none-any.whl.metadata
Downloading pyasn1-0.5.1-py2.py3-none-any.whl.metadata (8.6 kB)
Downloading google_auth-2.24.0-py2.py3-none-any.whl (183 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 183.8/183.8 kB 10.8 MB/s eta 0:00:00
Downloading cachetools-5.3.2-py3-none-any.whl (9.3 kB)
Downloading pyasn1-0.5.1-py2.py3-none-any.whl (84 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 84.9/84.9 kB 5.0 MB/s eta 0:00:00
Installing collected packages: pyasn1, cachetools, rsa, pyasn1-modules, google-auth
Successfully installed cachetools-5.3.2 google-auth-2.24.0 pyasn1-0.5.1 pyasn1-modules-0.3.0 rsa-4.9
[notice] A new release of pip is available: 23.2.1 -> 23.3.1
[notice] To update, run: python.exe -m pip install --upgrade pip
PS C:\Users\clundin> python -c 'import google.auth'
PS C:\Users\clundin> python -c 'import google.oauth2'
PS C:\Users\clundin>
from google-auth-library-python.
It works but why?
I think import google
will load all package
from google-auth-library-python.
Here is a document outlining importing for Python 3.12. https://docs.python.org/3/reference/import.html.
I think the behavior is likely because google
is a namespace package, but I did not take a close look.
from google-auth-library-python.
Thank you for support
from google-auth-library-python.
Related Issues (20)
- OAuth2 RefreshError while refreshing access token in Docker HOT 3
- Unit tests fail with `cryptography >= 39.0.0` when using python 3.7 HOT 1
- add underlying cause for `TransportError` HOT 1
- Getting Keyerrror _refresh_handler with old tokens HOT 4
- Generated Access Tokens are flagged as expired prematurely HOT 27
- Documentation for Indexing API still uses deprecated oauth2client instead of google-auth and never mentions to install either HOT 1
- ImportError in google.oauth2.id_token HOT 1
- Google Cloud credentials already set but still showing it is not set HOT 3
- Breaking change when upgraded from 2.23.3 to 2.27.0 HOT 5
- Warning: a recent release failed HOT 1
- Warning: a recent release failed HOT 2
- Allow setting metadata environment variable `GCE_METADATA_HOST` alone HOT 1
- Support POST verb for URL-sourced credentials to enable Azure Pipelines WIF HOT 2
- Pickleable AuthorizedSession HOT 2
- Please implement with_subject on return type of google.auth.default HOT 6
- Support/RFC/FR: safely print/compare access tokens for debugging purposes HOT 2
- Bug: `refresh_token` doesn't work as documented HOT 2
- The async `AuthorizedSession` doesn't support customized `ClientSession` parameters
- ResourceExhausted: 429 received metadata size exceeds soft limit HOT 11
- mypy disallow-untyped-calls check fails for google-auth 2.30 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from google-auth-library-python.