2
votes

On Ubuntu 14.04, I've successfully installed the Python SDK following this: https://cloud.google.com/sdk/docs/downloads-apt-get

Also, I am able to deploy the app to Google App Engine, using the appcfg.py script.

I do have a configuration file where I declare the vendors directory and all third party libraries are installed there.

Everything works, except when I try to import Google Cloud Vision:

File "/home/vagrant/source/web/handlers/posts.py", line 8, in from google.cloud import vision File "/usr/lib/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/python/runtime/sandbox.py", line 1149, in load_module raise ImportError('No module named %s' % fullname) ImportError: No module named google.cloud.vision

I have installed Google Cloud Vision both with:

sudo pip install --upgrade google-cloud-vision

and

pip install --upgrade -t lib google-cloud-vision 

None of them work.

How do I install locally? As a third party or globally? How will it work on Google when I deploy?

1

1 Answers

0
votes

On the SDK's GitHub page it's stated that the Python idiomatic library for Google Cloud can't be run on App Engine for Python 2:

Heads up! These libraries are supported on App Engine standard's Python 3 runtime but are not supported on App Engine's Python 2 runtime.