Skip to content

Instantly share code, notes, and snippets.

@Ayoub-2
Created February 21, 2022 15:54
Show Gist options
  • Save Ayoub-2/09cb94bad7f735fe3c5dead32bfba29d to your computer and use it in GitHub Desktop.
Save Ayoub-2/09cb94bad7f735fe3c5dead32bfba29d to your computer and use it in GitHub Desktop.
Python 2 virtual env installation
sudo apt update
sudo apt-get install virtualenv
cd ~
mkdir tmp
cd tmp
wget https://www.python.org/ftp/python/2.7.15/Python-2.7.15.tgz
tar zxvf Python-2.7.15.tgz
cd Python-2.7.15
./configure --prefix=$HOME/opt/python-2.7.15 --with-ensurepip=install
make
make install
cd ~
sudo apt install python2-pip-whl,python2-setuptools-whl
virtualenv -p /home/username/opt/python-2.7.15/bin/python venv
source venv/bin/activate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment