Reputation: 7986
I recently upgraded my Google App Engine launcher on my Mac, running OSX 10.5.8, and afterwards my projects that work with images stopped working locally.
It seems to be the same problem that I had when first using GAE locally to work with images, before I installed 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 to ensure that dev_appserver.py was running the same version of Python. If I open the interpreter and type sys.version I get this back:
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 display the sys.version from my projects running through dev_appserver. Any thoughts on why dev_appserver can't find the PIL module? I have been banging my head against this for a bit.
Thank you!
Upvotes: 3
Views: 1393
Reputation: 882103
You may be suffering from the problems I was explaining here, specifically, I think...:
You need to find another way to extend Python
sys.path
's appropriately. The simplest way is to make a file namedPIL.pth
with a single-line content:
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages
and place that PIL.pth in any of the directories that all Python processes see; in my case, I used
/Library/Python/2.5/site-packages/
-- but that directory is not available in a pristine installation of Mac OS X 10.5 so you may have to use some other directory.
Upvotes: 4