How can you use two different versions of Django for different projects on the same machine?

后端 未结 6 745
难免孤独
难免孤独 2020-12-17 16:18

I\'m currently using Django 1.0 on my Mac OS X 10.5.7 box. It\'s installed to:

/Library/Python/2.5/site-packages/django/

However, there are features that are

相关标签:
6条回答
  • 2020-12-17 16:36

    You can use different users at operating system level. It works nice on linux, and I guess it should work on Mac, too.

    You can install django and other packages into the per user site-packages directory:

    http://www.python.org/dev/peps/pep-0370/

    Related: Do I need virtualenv?

    0 讨论(0)
  • 2020-12-17 16:40

    virtualenv

    0 讨论(0)
  • 2020-12-17 16:40

    virtualenvwrappper make virtualenv easier. http://pypi.python.org/pypi/virtualenvwrapper

    0 讨论(0)
  • 2020-12-17 16:41

    zc.buildout (esp. for deployment) and virtualenv (esp. for development) were Jacob Kaplan Moss's top suggestions at the "Django in the real world" tutorial he gave at OSCON today, though he did mention many other tools -- see his slides on O'Reilly's site.

    0 讨论(0)
  • 2020-12-17 16:47

    Take a look at virtualenv http://pypi.python.org/pypi/virtualenv It helps you keep contained environments. Pinax uses it. http://www.pinaxproject.com

    0 讨论(0)
  • 2020-12-17 16:50

    You may want to consider using something like Virtualenv. It allows you to set up multiple isolated Python environments. So, not only could you have multiple Djangos, but you could have different versions of Python running as well.

    Zed Shaw created a screen cast of setting up Virtualenv, although not with Django specifically, (he shows how to get his mail software, Lamson, up and running). However, the concepts also work for setting up multiple versions of Django on the same machine with Virtualenv.

    0 讨论(0)
提交回复
热议问题