trouble with importing gcloud libs in python script

292 Views Asked by At

I have updated gcloud components. I have installed BigQuery lib using pip install following the instructions in the online doc. I am running Python 2.7.10.

when I run a python script that has the following line:

from google.cloud import bigquery

it returns the following error:

ImportError: No module named google.cloud

I tried python 3.6 and still get the same error.

I did reintsall google sdk and still got the same error.

if I do touch /Library/Frameworks/Python.framework/Versions/2.7/lib/python‌​2.7/site-packages/go‌​ogle/init.py then import google woudl work, but not import google.cloud

any help is appreciated.

1

There are 1 best solutions below

2
On

The Cloud SDK is not enough. Just use pip install --upgrade google-cloud-bigquery, see https://github.com/GoogleCloudPlatform/google-cloud-python/tree/master/bigquery