[IPython-dev] Accessing python 2 and python 3 from the same virtualenv

Eric Matthes ehmatthes at gmail.com
Mon Nov 18 19:34:26 EST 2013


Hi,

I am working on a set of notebooks that form the basis of a Python
curriculum, so sometimes I want to use a Python 3 interpreter and sometimes
I want to use a Python 2 interpreter. I am running Ubuntu 12.04, with a
number of different Python versions installed. To access any particular
version, I just enter `python` in a terminal for the default Python,
`python2.7` for a 2.7 interpreter, `python3.2`, etc. When I set up a
virtualenv and install ipython, ipython attaches to a particular python.

What I'd like to do:
- Set up a virtualenv.
- Install ipython.
- Be able to run `ipython notebook` attached to Python 2.7
- Be able to run `ipython notebook` attached to Python 3.2

Is there a straightforward way to do this? I don't want to have to maintain
two separate virtualenv's, if possible.

Thank you.

Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20131118/b9fcc04e/attachment.html>


More information about the IPython-dev mailing list