Wonderjar's Blog

在Python2.6机器上创建Python2.7 virtualenv

2018-09-10

安装pip

wget https://bootstrap.pypa.io/2.6/get-pip.py
python get-pip.py

安装virtualenv

sudo pip install virtualenv

安装Python2.7

wget http://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz
tar -zxvf Python-2.7.9.tgz
cd Python-2.7.9
mkdir ~/.localpython
./configure –prefix=$HOME/.localpython
make
make install

创建virtualenv

virtualenv venv -p $HOME/.localpython/bin/python2.7

Tags: Python