How can I use multiple python virtual environments on same server

Question:

How can I deploy and host multiple python projects with different dependancies on the same server at the same time?

Asked By: Euphorbium

||

Answers:

Use virtualenv for python. You can can install any other version of python/packages in it, if required.

Answered By: Netro

It’s not true of course that only one virtualenv can be activated at once. Yes, only one can be active in a shell session at once, but your sites are not deployed via shell sessions. Each WSGI process, for example, will create its own environment: so all you need to do is to ensure that each wsgi script activates the correct virtualenv, as is (in the case of mod_wsgi at least) well documented.

Answered By: Daniel Roseman
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.