1、在当前用户下安装Python
wget https://www.python.org/ftp/python/2.7.17/Python-2.7.17.tgz
mkdir -p ~/sw/src
cd ~/sw/src
把 Python-2.7.17.tgz 内容解压到 当前目录下
./configure --prefix=$HOME/sw
make
make install
配置 PATH
2、安装 setuptools
wget https://bootstrap.pypa.io/ez_setup.py
python ez_setup.py
3、安装 pip
wget --no-check-certificate https://github.com/pypa/pip/archive/19.3.1.tar.gz
tar zxvf 19.3.1.tar.gz
cd pip-19.3.1
python setup.py install
升级 pip install --upgrade -i http://mirrors.aliyun.com/pypi/simple/ pip
4、安装 virtualenv
pip install virtualenv
网友评论