So when I run my import statement in my python script, I'd get a ModuleNotFoundError.
from google.cloud import bigquery
ModuleNotFoundError: No module named 'google'
I've been following https://www.getcensus.com/blog/how-to-hack-it-extracting-data-from-google-bigquery-with-python-2 and I've ran a
pip install --upgrade google-cloud-bigquery
which still hasn't worked
I've tried installing a few other packages from google, but nothing has worked so far.
You have to create a virtual env in your current project, then install the following package with pip :
requirements.txt file
google-api-python-client==2.70.0
In your virtual env, run the following command :
pip install -r requirements.txt
Then you will be able to import the expected elements from the library :
from google.cloud import bigquery
Check your Python version and use Python 3.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With