Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Use <a href="http://pypi.python.org/pypi/virtualenv" rel="noreferrer">Virtualenv</a>.</p> <p>There is more information here: <a href="http://web.archive.org/web/20120303203403/http://www.arthurkoziel.com/2008/10/22/working-virtualenv/" rel="noreferrer">Working with virtualenv</a>.</p> <p>Using virtualenv you can create a new virtual python environment with whatever version of Python you want for each project or application. You can then activate the appropriate environment when you need it.</p> <p><strong>To expand on my answer:</strong></p> <p>You can install multiple versions of Python on your computer (I have 2.4, 2.5, 2.6 and 3.1 on my machine - I install each from source). I use a Mac, and keep my system Python as whatever OS X sets as the default.</p> <p>I use <em>easy_install</em> to install packages. On ubuntu you can get easy_install like this:</p> <pre><code>sudo apt-get install python-setuptools </code></pre> <p>To install virtualenv then do:</p> <pre><code>easy_install virtualenv </code></pre> <p>I tend to create a new virtualenv for each project I'm working on and don't give it access to the global site-packages. This keeps all the packages tight together and allows me to have the specific versions of everything I need.</p> <pre><code>virtualenv -p python2.6 --no-site-packages ~/env/NEW_DJANGO_PROJECT </code></pre> <p>And then whenever I am doing anything related to this project I activate it:</p> <pre><code>source ~/env/NEW_DJANGO_PROJECT/bin/activate </code></pre> <p>If I run python now it uses this new python. If I use easy_install it installs things into my new virtual environment.</p> <p>So, virtualenv should be able to solve all of your problems.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload