Install python Google Cloud Client on Ubuntu 14.04

I am working on Ubuntu 14.04, 32 bit. I get this error in the Google App Engine server code:

import cloudstorage 

ImportError: no module named cloudstorage

I ran this command to install the GCS module:

pip install GoogleAppEngineCloudStorageClient -t / home / john / software / google_appengine / lib / -force-reinstall

My colleague installed the cloudstorage module on Windows 7 by simply copying the "cloudstorage" folder to the GAE / lib folder. Running code on his PC does not create an ImportError. I also tried this

How can I install the cloudstorage module on Linux to avoid ImportError?

0
python google-app-engine google-cloud-storage ubuntu
source share
3 answers

First you need to install the client using svn, you will get a demo and test code:

Download: svn checkout http://appengine-gcs-client.googlecode.com/svn/trunk/python gcs-client

Then cd gcs-client/src and sudo/python or python setup.py install

You can use pip, but you will not get a demo and test code:

 pip install GoogleAppEngineCloudStorageClient -t <your_app_directory/lib> 
+5
source share

The library must be installed in your application directory. The docs suggest using PIP to put it in <app>/lib ::

 pip install GoogleAppEngineCloudStorageClient -t <your_app_directory/lib> 

What they don't mention is that if you need to create a lib directory, you need to put the (empty) __init__.py in lib so that Python reads it as importable. You will also need to say import lib.cloudstorage .

+5
source share

Try the following:

 pip install GoogleAppEngineCloudStorageClient -t <app_root> 

Then check if it works with:

 python -c "import cloudstorage" 
+1
source share

All Articles