I printed out the "sys.path", and it seems to be that the virtual
environments lib and site-packages are fully mentioned there...


The question is, why is mod_wsgi not concerning about the paths which
are defined in the sys.path ???


For any help and support I kindly thank you.


[Tue May 22 03:22:59 2012] [error]
['/usr/lib/python2.7/site-packages/ZODB3-3.10.3-py2.7-linux-x86_64.egg',
'/usr/lib/python2.7/site-packages/zdaemon-2.0.4-py2.7.egg',
'/usr/lib/python2.7/site-packages/ZConfig-2.9.0-py2.7.egg',
'/usr/lib/python2.7/site-packages/zc.lockfile-1.0.0-py2.7.egg',
'/usr/lib/python2.7/site-packages/transaction-1.1.1-py2.7.egg',
'/usr/lib/python2.7/site-packages/PasteScript-1.7.4.2-py2.7.egg',
'/usr/lib/python2.7/site-packages/PasteDeploy-1.5.0-py2.7.egg',
'/usr/lib/python2.7/site-packages/Paste-1.7.5.1-py2.7.egg',
'/usr/lib/python2.7/site-packages/Mako-0.4.2-py2.7.egg',
'/usr/lib/python2.7/site-packages/Chameleon-2.4.0-py2.7.egg',
'/usr/lib/python2.7/site-packages/MarkupSafe-0.15-py2.7-linux-x86_64.egg',
'/usr/lib/python2.7/site-packages/Jinja2-2.6-py2.7.egg',
'/usr/lib/python2.7/site-packages/docutils-0.8-py2.7.egg',
'/usr/lib/python2.7/site-packages/Pygments-1.4-py2.7.egg',
'/usr/lib/python2.7/site-packages/lockfile-0.9.1-py2.7.egg',
'/usr/lib/python2.7/site-packages/SOAPpy-0.12.5-py2.7.egg',
'/usr/lib/python2.7/site-packages/wstools-0.3-py2.7.egg',
'/usr/lib/python2.7/site-packages/netifaces-0.5-py2.7-linux-x86_64.egg',
'/usr/lib/python2.7/site-packages/distribute-0.6.21-py2.7.egg',
'/usr/lib/python2.7/site-packages/zc.catalog-1.5-py2.7.egg',
'/usr/lib/python2.7/site-packages/z3c.autoinclude-0.3.4-py2.7.egg',
'/usr/lib/python2.7/site-packages/simplejson-2.2.1-py2.7-linux-x86_64.egg',
'/usr/lib/python2.7/site-packages/pytz-2011j-py2.7.egg',
'/usr/lib/python2.7/site-packages/martian-0.14-py2.7.egg',
'/usr/lib/python2.7/site-packages/WebTest-1.3.1-py2.7.egg',
'/usr/lib/python2.7/site-packages/zc.buildout-1.5.2-py2.7.egg',
'/usr/lib/python2.7/site-packages/z3c.flashmessage-1.3-py2.7.egg',
'/usr/lib/python2.7/site-packages/z3c.pt-2.1.4-py2.7.egg',
'/usr/lib/python2.7/site-packages/RestrictedPython-3.6.0-py2.7.egg',
'/usr/lib/python2.7/site-packages/mechanize-0.2.5-py2.7.egg',
'/usr/lib/python2.7/site-packages/Sphinx-1.1.2-py2.7.egg',
'/usr/lib/python2.7/site-packages/translationstring-0.4-py2.7.egg',
'/usr/lib/python2.7/site-packages/repoze.lru-0.4-py2.7.egg',
'/usr/lib/python2.7/site-packages/WebOb-1.2b2-py2.7.egg',
'/usr/lib/python2.7/site-packages/megrok.jinja-0.1-py2.7.egg',
'/usr/lib/python2.7/site-packages/PyYAML-3.10-py2.7-linux-x86_64.egg',
'/usr/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg',
'/usr/lib/python2.7/site-packages/virtualenv-1.7-py2.7.egg',
'/usr/lib/python2.7/site-packages/pyodbc-3.0.3-py2.7-linux-x86_64.egg',
'/usr/lib/python2.7/site-packages/pycups-1.9.60-py2.7-linux-x86_64.egg',
'/usr/lib/python2.7/site-packages/venusian-1.0a3-py2.7.egg',
'/storage/PyENV/lin/UKDMindMapper/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg',
'/storage/PyENV/lin/UKDMindMapper/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg',
'/storage/PyENV/lin/UKDMindMapper/lib/python2.7/site-packages/pyramid-1.3.2-py2.7.egg',
'/storage/PyENV/lin/UKDMindMapper/lib/python2.7/site-packages/zope.deprecation-4.0.0-py2.7.egg',
'/storage/PyENV/lin/UKDMindMapper/lib/python2.7/site-packages/zope.interface-4.0.0-py2.7-linux-x86_64.egg',
'/storage/PyENV/lin/UKDMindMapper/lib/python2.7/site-packages/pymongo-2.2-py2.7-linux-x86_64.egg',
'/storage/PyENV/lin/UKDMindMapper/lib/python2.7/site-packages/pyramid_jinja2-1.3-py2.7.egg',
'/usr/lib/python2.7/site-packages', '/usr/src/fs',
'/usr/lib/python2.7/site-packages/PIL',
'/usr/lib/python2.7/site-packages/gst-0.10',
'/usr/lib/python2.7/site-packages/gtk-2.0',
'/usr/lib/python2.7/site-packages/wx-2.8-gtk2-unicode',
'/storage/PyENV/lin/UKDMindMapper/lib64/python27.zip',
'/storage/PyENV/lin/UKDMindMapper/lib64/python2.7',
'/storage/PyENV/lin/UKDMindMapper/lib64/python2.7/plat-linux2',
'/storage/PyENV/lin/UKDMindMapper/lib64/python2.7/lib-tk',
'/storage/PyENV/lin/UKDMindMapper/lib64/python2.7/lib-old',
'/storage/PyENV/lin/UKDMindMapper/lib64/python2.7/lib-dynload',
'/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2',
'/storage/PyENV/lin/UKDMindMapper/lib/python2.7/site-packages']



Am 22.05.2012 03:05, schrieb Tamer Higazi:
> Hi Graham,
> Thanks for your quick response....
> 
> Am 22.05.2012 02:35, schrieb Graham Dumpleton:
>> Two possibilities.
>>
>> The Apache user doesn't have access to the virtual environment directories.
> 
> drwxr-xr-x 5 tamer tamer 4096 22. Mai 00:24 UKDMindMapper
> 
> should be totally accessable for apache, because world can read it's
> content.
> 
>>
>> Or, the package is a compressed egg and because PYTHON_EGG_CACHE is
> 
> The WSGI file looks now like this:
> 
> import os,sys
> os.environ['PYTHON_EGG_CACHE'] = '/tmp'
> 
> from pyramid.paster import get_app
> application =
> get_app('/storage/PyProjects/UKDMindMapperApp/development.ini','main')
> 
>> not set to a writable location it is failing to unpack the egg so it
>> can be used.
>>
>> The latter doesn't always result in an obvious error.
>>
>> For the first, print out sys.path in the WSGI script file to see what
> 
> how do I print out the sys.path in the WSGI script, when I start apache
> and open the desired URL?!
> 
>> it gets set to. If no sub package directories are listed from virtual
>> environment, likely it or some parent directory isn't
>> readable/searchable to Apache user.
>>
>> Graham
>>
>> On 22 May 2012 10:20, Tamer Higazi <[email protected]> wrote:
>>> Hi!
>>> I am trying to set the pythonpath for the WSGI application, and it
>>> always fails. mod_wsgi always look in the main
>>>
>>> /usr/lib/python27/site-packages folder, and I don't know why.
>>>
>>> I have set up a virtual environment and installed all packages.
>>>
>>> In the VirtualHost section I set the python path:
>>>
>>> WSGIDaemonProcess pyramid user=apache group=apache threads=4
>>> python-path=/storage/PyENV/lin/UKDMindMapper/lib/python2.7/site-packages
>>>
>>>
>>> For any advises howto tell mod_wsgi to use a differen python-path
>>> successfully, I would kindly thank you.
>>>
>>>
>>>
>>> Tamer
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" 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/modwsgi?hl=en.

Reply via email to