Python bigquery - ImportError: no module named google.apputils

I am trying to use the python bigquery google library, but whenever I run import bq I get the following error:

 --------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-21-923a4eec0450> in <module>() ----> 1 import bq /Users/tahirfayyaz/anaconda/python.app/Contents/lib/python2.7/site-packages/bq.py in <module>() 31 import oauth2client.tools 32 ---> 33 from google.apputils import app 34 from google.apputils import appcommands 35 import gflags as flags ImportError: No module named google.apputils 

I installed and even updated google-apputils, but I still get this error.

+6
source share
1 answer

The way you distribute Google cloud tools has changed a bit, you can download the current version of the software via the Cloud SDK: * https://developers.google.com/cloud/sdk/

The SDK will install a sealed environment containing bigquery, as well as all its dependencies, such as oauth2client and google.apputils. It no longer uses ez-install.

You can add the SDK to your PATH to select the current bq.py program. export PATH = $ SDKROOT / platform / bigquery: $ PATH

You can add the SDK to your PYTHONPATH if you are trying to import something directly, as in the example above. export PYTHONPATH = $ SDKROOT / platform / bigquery: $ PYTHONPATH

+1
source

All Articles