开发者

Using virtualenv to install different versions of same package

Since I have Django 1.1x on my Debian setup - how can I use virtualenv or similar and not have it mess up my system's default django version which in turn would break all my sites?

Detailed instructions or a great tutorial link would very much be appreciated - please don't offer vague advice since I'm s开发者_Go百科till a noob.

Currently I store all my django projects in ~/django-sites and I am using Apache2 + mod_wsgi to deploy.


If you have easy_install, or better yet pip installed, should be as easy as:

  1. easy_install/pip install virtualenv
  2. mkdir django1.2
  3. virtualenv django1.2

This will put the python binary in a bin folder inside the django1.2 folder. Just use that python binary, and you've got a nice little self-contained environment. You can then install easy_install/pip into that environment, and then install django 1.2 as well, and hack away.


Since you are using mod_wsgi, make sure you read:

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜