I have my Ubuntu 12.04 system set up so that I can create a virtualenv with either Python 2.7 or Python 3.3, and run IPython Notebook. The problem is, I don't know exactly what I did to my system to make this possible. I am trying to help someone else get their system set up the same way, and I'm not sure what packages I am missing.
On my system I can run the following commands to get IPython Notebook running in a virtualenv:
~$ mkdir test_ipython3.3
~$ cd test_ipython3.3
~/test_ipython3.3$ virtualenv -p python3.3 venv
~/test_ipython3.3$ source venv/bin/activate
(venv)~/test_ipython3.3$ pip install ipython[all]==1.1.0
I can do the same set of commands with virtualenv -p python2.7 venv, and have an almost identical environment except it runs Python 2.7.
I am trying to get a 12.04 installation on virtualbox set up so that I can run these commands successfully as well, but I keep failing. After building a clean Ubuntu 12.04 machine in virtualbox, I do the following:
# Update machine:
sudo apt-get update
sudo apt-get dist-upgrade
# Install Python 3.3:
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-get install python3.3
# Install virtualenv
sudo apt-get install python-pip
sudo pip install pip --upgrade
sudo pip install virtualenv
# Install necessary packages:
sudo apt-get install python-dev python3.3-dev libzmq-dev
# Build a venv, using Python 2.7, which works:
~$ mkdir test_ipython2.7
~$ cd test_ipython2.7
~/test_ipython2.7$ virtualenv -p python2.7 venv
~/test_ipython2.7$ source venv/bin/activate
(venv)~/test_ipython2.7$ pip install ipython[all]==1.1.0
(venv)~/test_ipython2.7$ ipython notebook
# Works, opening an ipynb that runs Python 3.3
# Build a venv, using Python 3.3, which fails:
~$ mkdir test_ipython3.3
~$ cd test_ipython3.3
~/test_ipython3.3$ virtualenv -p python3.3 venv
~/test_ipython3.3$ source venv/bin/activate
(venv)~/test_ipython3.3$ pip install ipython[all]==1.1.0
(venv)~/test_ipython3.3$ ipython notebook
# Fails, says that ipython is not installed, despite having reported otherwise
After trying to install ipython in the 3.3 virtualenv, I get a message that ipython and a number of supporting packages have been installed successfully. But when I try to run ipython or ipython notebook, I get a message that ipython is not installed. Watching the install process, and scrolling back through the output, I can't find any obvious failures. I even installed zmq from source, so I have zmq 4.0.3 installed, which ipython is finding during its installation.
Can anyone spot where I am going wrong?
which ipythonandwhich pipat various points? Make sure these are inside the envs.which pipshows that pip is inside the venv (test_ipython3.3/venv/bin/pip), andwhich ipythonhas no output because ipython never really gets installed.pip installcall that is failing?pip install ipython[all]==1.1.0, from an active virtualenv: pastebin.com/37cfN4HJ