I just launched an app into production that uses the Python Imaging Library 
(PIL).  PIL was installed on my local development environment, but not on 
my production server, and the app started throwing errors.

I installed PIL on the server.  If I launch the app in web2py's interactive 
command line shell in a console on the server, I can import it without 
error, so I know it's installed and web2py can pick it up.  But the app is 
still throwing errors when viewed in a browser.  

I'm assuming that's because the server needs to be restarted.  I'm running 
it as a fastcgi process under Apache.  I respond to each request using this 
file I call web2py.fcgi:

#!/home/myaccount/.env/bin/python2.7
# python running in virtual environment named '.env'

import sys, os

# add web2py to the front of the system's executable path
sys.path.insert(0, "/home/myaccount/web2py")

# this assumes flup is already installed on the server
from flup.server.fcgi_fork import WSGIServer

# Switch to the web2py directory so gluon can be imported
os.chdir("/home/myaccount/web2py")

# import the web2py's fcgi gateway
import gluon.main
import gluon.contrib.gateways.fcgi as fcgi

application=gluon.main.wsgibase
# or
# application=gluon.main.wsgibase_with_logging
WSGIServer(application).run()


I have attempted to restart using:

sudo pkill web2py.fcgi
sudo service apache2 restart

That seems to clear out the web2py.fcgi processes and restarting the 
server, but, I'm still getting 'No module named PIL' errors.

Any suggestions you could provide would be greatly appreciated!

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/89f56774-2a99-4ec4-8eb0-3f045ae96b2d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to