Google App Engine dev_appserver cannot find PIL (I installed it)

I recently updated my Google App Engine launcher on my Mac by running OSX 10.5.8, and then my projects that work with images stopped working locally.

It seems to be the same problem as when I first used GAE for working with images before I set PIL. Here is the error I get:

SystemError: Parent module 'PIL' not loaded

I have PIL installed. When I run python normally, I can access it and work with it as expected. I also checked that dev_appserver.py runs the same version of Python. If I open the interpreter and print sys.version, I will return it:

2.5 (r25:51918, Sep 19 2006, 08:49:13)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)]

This is identical to what I get when I show sys.version from my projects running through dev_appserver. Any thoughts on why dev_appserver cannot find the PIL module? I hit my head a bit about it.

Thank!

+3
source share
1 answer

Perhaps you are suffering from the problems that I have explained here , in particular, I think ...:

You need to find another way to extend Python sys.path. respectively. The easiest way is to create a file with a name PIL.pthusing single-line content:

/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages

PIL.pth , Python ; /Library/Python/2.5/site-packages/ - Mac OS X 10.5, .

+4

Source: https://habr.com/ru/post/1744993/


All Articles