If you have a *.wsgi file, you must be using mod_wsgi. I don't know
that configuration but here's the official documentation, found by
googling "pylons mod_wsgi":

http://code.google.com/p/modwsgi/wiki/IntegrationWithPylons

In general, to use a virtualenv, you run the python or paster or
whatever in the 'bin' directory of the virtualenv.  Or you activate it
on Unix/Mac by running "source myvirtualenv/bin/activate" or on
Windows by running "myvirtualenv/Scripts/activate.bat".  Activating
shifts your $PATH around to put the virtualenv at the beginning of it.
Or you install virtualenvwrapper and run "workon myvirtualenv".
(That's my preferred way.)  But mod_wsgi is different.  The virtualenv
has an activate_this script that was originally intended for
situations like mod_wsgi, but I think the mod_wsgi author has said not
to use it. I may be wrong about that. I've cc'd Graham Dumpleton for
clarification.

The IntegrationWithPylons article has a link to "mod_wsgi and
workingenv.py".  I think the latter page should be deleted and
mod_wsgi instructions put into the Pylons docs. Any objections to
deleting it now?



On Sat, Mar 27, 2010 at 6:35 AM, mitochromium <[email protected]> wrote:
> OK thanks. Is the setup similar, though? i.e. creating a .wsgi file
> and pointing it to the virtualenv? I can't seem to find any docs on
> setting up virtualenv, just installation.
>
> On Mar 27, 3:12 am, Mike Orr <[email protected]> wrote:
>> On Fri, Mar 26, 2010 at 9:54 PM, mitochromium <[email protected]> wrote:
>> > I'm running through the cookbook, and have been stumped by the startup
>> > script/activate_workingenv.py section.
>>
>> > I'm assuming (it's not really clear) that I'm supposed to replace
>> > the .wsgi file contents with the startup script, which I did. I then
>> > added activate_workingenv.py to my site-packages. It seems to be
>> > behaving strangely, though. Upon restarting apache and visiting the
>> > page, I get a 500 error. apache error_log states :
>> >> IOError: [Errno 2] No such file or directory: 
>> >> '/home/test/./lib/python2.5/setuptools.pth'
>>
>> > It seems to be concatenating with the "." no matter what, or if I omit
>> > the period, strips root from string.
>>
>> > e.g. If I edit activate_workingenv.py to something like:
>>
>> >>package_root = os.path.join(root, '/lib/python' + python_version)
>>
>> > error_log will state:
>>
>> >> IOError: [Errno 2] No such file or directory: 
>> >> '/lib/python2.5/setuptools.pth'
>>
>> > omitting WORKING_ENV/root from the string.
>>
>> Workingenv is old and no longer supported. Virtualenv has superceded
>> it.  The recipe you're looking at may be obsolete.
>>
>> --
>> Mike Orr <[email protected]>



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

Reply via email to