On Sun, Jun 15, 2008 at 8:40 AM, Chris <[EMAIL PROTECTED]> wrote: > > I'm trying to run a simple app through Apache via mod_wsgi. Following > the directions at > http://wiki.pylonshq.com/display/pylonscookbook/mod_wsgi+and+workingenv.py > I've gotten the simple helloworld app.wsgi file to work correctly.
This needs to be updated for virtualenv, which is workingenv's successor. Any volunteers? > However, it fails when I try to run the production app.wsgi, taken > from http://code.google.com/p/modwsgi/wiki/IntegrationWithPylons. The > Apache error log reads: > > [Sun Jun 15 11:18:28 2008] [error] [client 127.0.0.1] mod_wsgi > (pid=11166): Target WSGI script '/home/chris/public_html/pylons/myapp/ > myapp.wsgi' cannot be loaded as Python module. > [Sun Jun 15 11:18:28 2008] [error] [client 127.0.0.1] mod_wsgi > (pid=11166): Exception occurred within WSGI script '/home/chris/ > public_html/pylons/myapp/myapp.wsgi'. > [Sun Jun 15 11:18:28 2008] [error] [client 127.0.0.1] Traceback (most > recent call last): > [Sun Jun 15 11:18:28 2008] [error] [client 127.0.0.1] File "/home/ > chris/public_html/myapp/myapp.wsgi", line 5, in <module> > [Sun Jun 15 11:18:28 2008] [error] [client 127.0.0.1] from > paste.deploy import loadapp > [Sun Jun 15 11:18:28 2008] [error] [client 127.0.0.1] ImportError: No > module named deploy > > Sure enough, trying to import paste.deploy in a Python shell fails. > I've tried the easy_install commands: > > sudo easy_install -a Pylons > sudo easy_install PasteDeploy > sudo easy_install -a PasteDeploy > sudo easy_install --always-copy PasteDeploy > > ...and nothing works. Could someone please tell me where this package > is located and how to install it? Why don't any of those commands work? We need to see the output of these commands to troubleshoot it. Which directory do they say it's installing into? is it the workingenv or the default environment? Are you in the same environment when you run Pylons? It sounds like you're installing it into one environment but running it in another. Also look for multiple versions of Python on the machine; each has its own site-packages. One advantage of virtualenv is it makes a modified Python executable that defaults to its site-packages, so you can simply run its Python or easy_install without activating the environment. -- Mike Orr <[EMAIL PROTECTED]> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
