Open RenzoBertocchi opened 5 years ago
Which quickstart is this for? Were you able to install the required libraries? See step 2 in this quickstart: https://developers.google.com/drive/api/v3/quickstart/python
pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib
Did all steps but got that error following this: https://developers.google.com/admin-sdk/directory/v1/quickstart/python
Can you try installing pyopenssl? https://stackoverflow.com/questions/14063124/importerror-cannot-import-name-signedjwtassertioncredentials
Hi . I am also getting the same error when I am using python script to upload file to google drive.. Few months back it used to work. [python quickstart.py]
Now when I did
python3 quickstart.py
it worked.
Same error... All installed properly but still... @asrivas installed pyopenssl as mentioned but still :(
Using pycharm.
Pls, try this pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib
same error: from google_auth_oauthlib.flow import InstalledAppFlowp ImportError: cannot import name 'InstalledAppFlowp' from 'google_auth_oauthlib.flow'
installed all dependencies as requested per doumentation
Yep, getting this error as well, it works when running locally, but not when on the cloud. I've installed and update everything and followed the documentation.
Actually, I ran the command pip3 install google-auth-oauthlib
and the error disappeared!
It's possible there are multiple versions of python installed. You could try: python3.9 -m pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib
. Python3.9 as an example.
Expected Behavior
run
Actual Behavior
Traceback (most recent call last): File "google.py", line 5, in
from google_auth_oauthlib.flow import InstalledAppFlow
File "/Library/Python/2.7/site-packages/google_auth_oauthlib/flow.py", line 62, in
import google.oauth2.credentials
File "/Library/Python/2.7/site-packages/google/oauth2/credentials.py", line 42, in
from google.oauth2 import _client
File "/Library/Python/2.7/site-packages/google/oauth2/_client.py", line 35, in
from google.auth import jwt
File "/Library/Python/2.7/site-packages/google/auth/jwt.py", line 53, in
from google.auth import _service_account_info
File "/Library/Python/2.7/site-packages/google/auth/_service_account_info.py", line 22, in
from google.auth import crypt
File "/Library/Python/2.7/site-packages/google/auth/crypt/init.py", line 39, in
from google.auth.crypt import rsa
File "/Library/Python/2.7/site-packages/google/auth/crypt/rsa.py", line 27, in
from google.auth.crypt import _python_rsa
File "/Users/mrcsvberto/google.py", line 5, in
from google_auth_oauthlib.flow import InstalledAppFlow
ImportError: cannot import name InstalledAppFlow
Steps to Reproduce the Problem
python quickstart.py
Specifications