Loading...

modwsgi@googlegroups.com

[Prev] Thread [Next]  |  [Prev] Date [Next]

Re: [modwsgi] pyramid on mod_wsgi: No module named deprecation (SOLVED) Graham Dumpleton Thu Feb 02 03:09:03 2012

On 19 January 2012 13:16, Tamer Higazi <[EMAIL PROTECTED]> wrote:
> I solved the problem by adding
>
> WSGIPythonHome /storage/modwsgi/env
>
> in the vhost file.

I can't explain that, unless there was some difference between system
wide Python that mod_wsgi was using and that used to create the
virtual environment. Do you happen to have multiple Python 2.7
installations on your system?

> What I am deeply missing is the feature, that this setting could be
> added inside a VirtualHost entry.
>
> Let us say, I have several python applications running, it would be
> beautiful to set for every VirtualHost a different "WSGIPythonHome" what
> mod_wsgi does not allow.

That can't be done as WSGIPythonHome applies to the Python interpreter
core as a whole and there is only one per process where as multiple
VirtualHost's could be handled in that one process.

This is why it is preferred that you use python-path option and
delegate every application to distinct daemon process groups.

Graham

> Thank you for your support
>
>
>
> Tamer
>
> Am 19.01.2012 02:06, schrieb Graham Dumpleton:
>>
>>
>> On Wednesday, 18 January 2012, Tamer Higazi <[EMAIL PROTECTED]
>> <mailto:[EMAIL PROTECTED]>> wrote:
>>> Hi people!
>>> I followed the pyramid guide to run an pyramid application as mod_wsgi
>>> and I figure out that I have an error log. Apache tells me that the
>>> "zope.deprecation" module can't be loaded. But the library is there:
>>>
>>> [EMAIL PROTECTED] /storage/modwsgi/env/lib/python2.7/site-packages $ ls -lA
>>> | grep depre
>>>
>>> drwxr-xr-x 4 tamer tamer   4096 17. Jan 20:11 zope.deprecation-3.5.0-
>>> py2.7.egg
>>
>> Try setting PYTHON_EGG_CACHE to writable location in WSGI script file.
>>
>>  import os
>>  os.environ['PYTHON_EGG_CACHE'] = '/some/path'
>>
>> Could be that some other required package is a compressed egg and it is
>> failing to unpack. When this occurs sometimes it doesn't show the real
>> error and you get a problem with higher level import like you are.
>>
>> Other than that, from command line Python, import zope.deprecation and
>> print out __file__ attribute of module to make sure where it is coming from.
>>
>> Graham
>>
>>> What I figured out now is the follwing, that If I use the system
>>> python interpreter I get exactly the same error import mesage on the
>>> screen.
>>>
>>> If I use the python executable from the virtual env, it does it all
>>> right and no error is being displayed on the screen.
>>>
>>>
>>> Now the big question has it somehting todo that mod_wsgi uses the
>>> global python interpreter?! Because, whatever I do, and I did all the
>>> the variants, even I followed the virtualenv guide, I see always in
>>> the apache log the same error import message.
>>>
>>>
>>> Apache error_log:
>>> http://pastebin.com/raw.php?i=KswA2ZcT
>>>
>>> My Apache VHOST entry
>>> http://pastebin.com/raw.php?i=feE5KnZR
>>>
>>> and my pyramid.wsgi content:
>>>
>>> from pyramid.paster import get_app
>>> application = get_app('/storage/modwsgi/env/myapp/
>>> development.ini','main')
>>>
>>>
>>> Any ideas?! I am not getting smart. For any support 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]
>> <mailto:[EMAIL PROTECTED]>.
>>> To unsubscribe from this group, send email to
>> [EMAIL PROTECTED]
>> <mailto:[EMAIL PROTECTED]>.
>>> For more options, visit this group at
>> http://groups.google.com/group/modwsgi?hl=en.
>>>
>>>
>>
>> --
>> 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.
>
> --
> 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.
>

-- 
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.