Can I ask for a little help with virtualenv. I am looking at the docs here http://guide.python-distribute.org/pip.html and here http://www.jython.org/jythonbook/en/1.0/appendixA.html#virtualenv

There are a few things I can't quite understand about it. First just to clarify I am on ubuntu and my default python is 2.7.1

1. I use virtualenv to create 'sandboxed' python environments but do I use virtualenv to manage(install and remove) python versions etc python3, pypy, jython or am I installing them separately and just using virtualenv to manage the 'sandboxing'? (guess is it like perlbrew or rvm).

2. How do I specify the interpreter type for the virtualenv. It appears the command

virtualenv --no-site-packages pip_test_env

set up an environemnt with the default interpreter. The jython example contains a path to jython and then an extra python to virtualenv.

jython <<path to Jython>>/jython2.5.1/Lib/site-packages/virtualenv-1.3.3-py2.5.egg/virtualenv.py JY2.5.1Env

. How do I best do this?

Found a solution to toggle interpreters on a debian/ubuntu system here http://codeghar.wordpress.com/2009/01/27/update-alternatives-in-debian/

Basically

sudo update-alternatives --config python

or

sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.4 10
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.5 20
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.