bumplzz69 / google-cloud-sdk

Automatically exported from code.google.com/p/google-cloud-sdk
0 stars 0 forks source link

gcloud preview app run does not recognize that PIL (Pillow) is installed #108

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Install Pillow: $ pip install Pillow
Run any App Engine app using the gcloud preview app run command

What is the expected output? What do you see instead?

When we request a image using the URL returned by Images.get_serving_url(), we 
can optionally specify to resize the image using the "=sxxx" at the end of the 
serving URL, where "xxx" is the size we want to resize it to.

This should resize the image, however, the console keeps throwing an error 
saying we don't have PIL installed (when in fact we do)

What is the output of 'gcloud info'?

WARNING: Serving resized images requires a working Python "PIL" module. The 
image is served without resizing.

Please provide any additional information below.

A workaround to this is to launch the dev_appserver.py manually. When you do 
this, it does recognize that we have PIL installed and it does resize the 
images:

$ python <path-to-SDK>/platform/google_appengine/dev_appserver.py <path-to-app>

Running on a Mac OS X Yosemite
Python 2.7
Installed PIL using pip install Pillow

➜  ~  gcloud version
Google Cloud SDK 0.9.43

app 2015.01.12
app-engine-go-darwin-x86_64 1.9.17
app-engine-java 1.9.17
app-engine-managed-vms 2014.11.03
app-engine-python 1.9.17
bq 2.0.18
bq-nix 2.0.18
compute 2015.01.12
core 2015.01.12
core-nix 2014.10.20
dns 2015.01.12
gcutil 1.16.5
gcutil-nix 1.16.5
gsutil 4.7
gsutil-nix 4.6
preview 2015.01.12
preview-extensions-darwin-x86_64 0.7.0
sql 2015.01.12

Original issue reported on code.google.com by Michael....@gmail.com on 25 Jan 2015 at 11:50

GoogleCodeExporter commented 9 years ago
Dont know if this is a good solution but a workaround is to change your 
PYTHONPATH so
on ~/.bash_profile i changed PYTHONPATH to
export 
PYTHONPATH="/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/pyth
on2.7/site-packages:/usr/local/google_appengine"

then do
source ~/.bash_profile

then run gcloud

Original comment by almondme...@gmail.com on 10 Jun 2015 at 6:09