On 27 February 2011 03:32, bc <[email protected]> wrote: > > > On Feb 25, 8:58 am, bc <[email protected]> wrote: >> I just read the page on using wsgi with virtualenv. I don't quite >> understand the point of using virtualenv. How is it different than >> doing a parallel install of python (which is fairly painless)? > > Replying to my own question... The difference seems to be that in the > context of a shell, you can do "/pathA/python script.py", and "/pathB/ > python script.py", and the two invocations will pick up the correct > libraries for each invocation. They can have different sets of > libraries installed, and they don't affect each other. But this > doesn't work in wsgi, because it can only load the python interpreter > from a single installation. So to run with different sets of > libraries, you need something like virtualenv.
Also that people may not have root access to a system and so can't change what Python installation mod_wsgi uses, nor install additional modules in the system wide Python. Virtual environments allow them to more easily install modules they need into a local area in directories they can access/write to and then setup sys.path as appropriate in a WSGI script file and have their application use those modules. Graham -- 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.
