简体   繁体   中英

So now that Django 1.2 is officially out

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM