Update (2018): These days I just use anaconda which I find easier to work with! As far as I’m aware the instructions below are still accurate, please let me know if this is not the case.
Using virtualenv in combination with pip is a great way to run isolated python environments with all kinds of packages. However if the system you are using does not have pip, easy_install or virtualenv installed system-wide, it’s a little bit tricky to set up.
With some experimentation and some googling (stackoverflow), here’s a quick guide to do it. I’m assuming you have python already on the system.
First, we need
ez_setup. The following commands grab the scripts and install them to
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py python ez_setup.py –-user
Now we can install pip in the same way:
curl -O https://bootstrap.pypa.io/get-pip.py python get-pip.py –-user
Now we have pip, and just need to add it to the path variable (add it to your
Finally, we can install packages. Get
pip install --user virtualenv
Now you can set up virtual environments for python, which is well-documented here.