9

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

5
  • 3
    You've answered your own question. Use virtualenv. Commented Jan 22, 2013 at 9:05
  • (A virtual environment is basically a copy of Python in a folder that has its own collection of installed packages etc. To set one up you choose a folder somewhere, and run virtualenv on it; that will create a Python and a pip executable. Installing packages with that pip will then cause them only to be installed for that particular Python.) Commented Jan 22, 2013 at 9:07
  • just create another virtualenv in other path. Commented Jan 22, 2013 at 9:12
  • 1
    I know how to use virtual environments for development, but just one virtual environment can be activated at the same time (by doing source sitename/bin/activate). How can I run multiple of those at the same time? Commented Jan 22, 2013 at 9:16
  • It might help if you expanded on your intended workflow. Of course two terminal sessions can have different virtualenvs but it's hard to understand why you'd want the same process to run multiple virtualenvs. Commented Jan 22, 2013 at 9:20

2 Answers 2

15

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.

Sign up to request clarification or add additional context in comments.

Comments

0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.