ImportError: cannot import name 'bigquery'
Solution 1
I was facing the same problem.But applying every answer nothing was working. Then I noticed that pip need to be ungraded. So I upgrade pip first.
python -m pip install --upgrade pip
Then I try this solution just changing a little bit https://stackoverflow.com/a/60895009/5393858
pip install --upgrade google-cloud
pip install --upgrade google-cloud-bigquery
pip install --upgrade google-cloud-storage
Solution 2
From a fresh setup of the VM;
Failed - pip3 install --upgrade google-cloud
Worked - pip3 install --upgrade google-cloud-bigquery
Worked - pip3 install --upgrade google-cloud-storage
It appears that individual product solutions should be installed instead of the generic google-cloud.
If you're still stuck, this helped!
Solution 3
Maybe try loading pip as a python module to ensure you're using the pip instance that your python executable is linked to.
python -m pip install --upgrade google-cloud-storage
Neel
Updated on July 28, 2022Comments
-
Neel almost 2 years
This must be a super trivial issue, but i've updated my windows virtual machine with;
pip install --upgrade google-cloud-storage
However, when I run the script I still receive the following error;
Traceback (most recent call last): File "file.py", line 6, in <module> from google.cloud import bigquery, storage ImportError: cannot import name 'bigquery'
Any suggestions or workarounds?
Thanks, Neel R
-
Neel about 4 yearsTurns out that I needed to the specific client :( Thanks for your assistance!
-
user3358107 almost 3 yearsThis worked for me! Previously google-cloud-bigquery was stuck on... "3.5"->google-resumable-media<2.0dev,>=0.6.0->google-cloud-bigquery) (2.20) Building wheels for collected packages: grpcio..... updating pip first on the instance worked. Thank you!!!!