ImportError: cannot import name 'v4'
See original GitHub issueSo, I’m trying to import the gspread library, but after freezing for a few seconds, the console spits out an error in doing so.
Environment info
Operating System: Windows 7 Python version: 3.6 gspread version: 2.0.0
Steps to reproduce
- Install gspread and oauth2 (both using Git Bash, acquired at https://git-scm.com/)
- Try executing
import gspread
Stack trace or other output that would be helpful
File "C:\Users\[user]\AppData\Local\Python\Python36-32\lib\site-packages\gspread-2.0.0-py3.6.egg\gspread\__init__.py", line 28, in <module> ImportError: cannot import name 'v4'
Issue Analytics
- State:
- Created 6 years ago
- Comments:27 (8 by maintainers)
Top Results From Across the Web
ImportError: cannot import name '_unicodefun' from 'click'
As a workaround, pin click to the last version via pip install --upgrade click==8.0.2 . Share.
Read more >How to Fix : “ImportError: Cannot import name X” in Python?
You can solve the “ ImportError : Cannot import name X” Error by resolving the circular dependencies. You can do that either by...
Read more >How to Fix ImportError: Cannot Import Name in Python - Rollbar
The Python ImportError: cannot import name error occurs when an imported class is not accessible or is in a circular dependency.
Read more >ImportError: cannot import name 'url' from django.conf.urls
The "ImportError: cannot import name 'url' from 'django.conf.urls'" occurs because django.conf.urls.url() has been deprecated and removed in ...
Read more >importerror: cannot import name from partially initialized module
ImportError: cannot import name 'x1' from partially initialized module 'x'. To resolve the ImportError: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I just reinstalled using pip install gspread==2.0.0 and looks like it is working (i’m not getting import error).
I had the same issue as @hjbct44 (who I suspect was off track with the issue initially raised here but helped solve my problem) on an upgrade from 0.6.2 to 3.0.1 and got:
Google Sheets API error gspread.exceptions.APIError: { “error”: { “code”: 403, “message”: "Google Sheets API has not been used in project XXX before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/sheets.googleapis.com/overview?project=XXX
which didn’t work until I disabled and renabled Google Drive API which then allowed me to successfully enable Google Sheets API.
Could this be added to the instructions for upgrading an existing project previously using the old Google API?