Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to find the Python PIL library.Google App Engine

Installed the Google App Engine SDK.Python 2.6 perfect. Wanted to go into images, and test locally.Installed PIL

Installed Python, then ran the PIL install, worked this time.

Things seemed good, but trying to do localhost image manipulation gives:

"NotImplementedError: Unable to find the Python PIL library.  Please
 view the SDK documentation for details about installing PIL on your system."

System : winxp

like image 780
benasio Avatar asked Jul 23 '09 10:07

benasio


People also ask

How do I know if python PIL is installed?

Step 2: To check if PIL is successfully installed, open up the python terminal by typing python3 in the terminal. This will open up the python3 interactive console now type the following command to check the current version of the PIL. This will output the currently installed version of the PIL.

Is PIL a library in Python?

PIL stands for Python Imaging Library, and it's the original library that enabled Python to deal with images. PIL was discontinued in 2011 and only supports Python 2. To use its developers' own description, Pillow is the friendly PIL fork that kept the library alive and includes support for Python 3.

Is pillow the same as PIL in Python?

What is PIL/Pillow? PIL (Python Imaging Library) adds many image processing features to Python. Pillow is a fork of PIL that adds some user-friendly features.


2 Answers

I took a while to get PIL working. Mainly because I forgot to tell app engine to load it in the yaml file:

 libraries:
     - name:    PIL
     version: 1.1.7

Maybe this step is obvious, but I did not see it documented well on google documentation and I found all kinds of messages here stating that PIL was not available on app engine. I want to confirm that PIL is running on app engine.

like image 142
peawormsworth Avatar answered Oct 15 '22 07:10

peawormsworth


We're probably going to need more information, so here are some questions and things to try.

How are you trying to access the PIL? Are you trying to use the google.appengine.api.images module, or PIL directly? It sounds like the former, but it's not clear.

Did you follow the App Engine instructions?

Post code, if you can.

Perhaps the most important thing to try: see if you can use PIL from a non-App Engine script. Just write a quick Python script that accesses it and see how that goes. Something like:

import Image
im = Image.open('filename.png')
im.show()

If that doesn't work, it's not surprising that Google App Engine wouldn't work with PIL.

like image 42
Blair Conrad Avatar answered Oct 15 '22 07:10

Blair Conrad