I am using mod_wsgi in embedded mode.
And #3 is my current configuration option.
My application code starts as follows:
import os, sys
os.environ['PYTHON_EGG_CACHE'] = '/egg_cache'
abspath = os.path.dirname(__file__)
sys.path.append(abspath)
os.chdir(abspath)
import webapp, simplejson
...
I will continue to using the embedded mode.
How different are your #1 and #2?
By the way, Clodoaldo, after reinstalling simplejson with
easy_install,
now I am getting the following error:
mod_wsgi (pid=2955): Target WSGI script '/var/www/wsgi-bin/dtm_app/
dtm_test_app.wsgi' cannot be loaded as Python module.
[Sun Nov 29 15:38:11 2009] [error] [client 127.0.0.1] mod_wsgi
(pid=2955): Exception occurred processing WSGI script '/var/www/wsgi-
bin/dtm_app/dtm_test_app.wsgi'.
[Sun Nov 29 15:38:11 2009] [error] [client 127.0.0.1] Traceback (most
recent call last):
[Sun Nov 29 15:38:11 2009] [error] [client 127.0.0.1] File "/var/www/
wsgi-bin/dtm_app/dtm_test_app.wsgi", line 10, in ?
[Sun Nov 29 15:38:11 2009] [error] [client 127.0.0.1] import
webapp, simplejson
[Sun Nov 29 15:38:11 2009] [error] [client 127.0.0.1] ImportError: No
module named simplejson
Any solutions?
Thanks!
On Nov 29, 3:05 pm, Graham Dumpleton <
graham.dumple...@gmail.com>
wrote:
> How are you configuring the location of the Python EGG cache. Are you using:
>
> 1. WSGIPythonEggs directive? Which means you MUST be using embedded mode.
>
> 2. Setting python-eggs option to WSGIDaemonProcess? Which means you
> MUST be using daemon mode and application must be properly delegated
> to that daemon mode process.
>
> 3. Setting PYTHON_EGG_CACHE in os.environ in WSGI script file?
>
> 4. Some other way?
>
> You need to provide more information about your configuration. Right
> now, you aren't using the correct way of setting Python egg cache for
> how you are running your application.
>
> Graham
>
> 2009/11/29 Hang-A <
mhwa...@gmail.com>: