Saravana Kumar
Saravana Kumar

Reputation: 394

Install python 2.6 in a sandbox/virt-env

I have python 2.7 running on ubuntu 14.04. and, I need to set up py2.6 in a sandbox environment. I tried using the command, virtualenv as

virtualenv /path/to/sandbox --no-site-packages

But, it copies /usr/bin/python2.7 binary file into the sandbox's bin folder.

Using pythonbrew also didn't work, as it throws compilation errors almost always.

How to create a sandbox environment and install python2.6 binary in it?

Upvotes: 0

Views: 1200

Answers (1)

Jörn Hees
Jörn Hees

Reputation: 3428

Virtualenv won't really install a new python version from scratch, but rather copy one of the versions installed on your system. That's why you first need to get a python2.6 binary for Ubuntu 14.04. It seems they don't officially support python2.6 anymore, so either you manually download and install it from http://python.org or use a ppa like this:

sudo add-apt-repository ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-get install python2.6

afterwards you can tell virtualenv to use python2.6 like this:

virtualenv -p python2.6 --no-site-packages /path/to/sandbox

Upvotes: 2

Related Questions