Install python2 / python3
apt-get install python2.7
apt-get install python3
1.1 switch python version
echo alias python=python3 >> ~/.bashrc
source ~/.bashrc
Install setuptools
wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
tar -xvf setuptools-0.6c11.tar.gz
cd setuptools-0.6c11
python setup.py build
python setup.py install
wget –no-check-certificate https://bootstrap.pypa.io/ez_setup.py
sudo python2 ez_setup.py –insecure
Install pip
1.1 installation
- pip project: https://pypi.org/project/pip/#history
tar -zxvf pip-9.0.1.tar.gz
cd pip-9.0.1
python setup.py install
1.2 alter pip source
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
Reference
- https://blog.csdn.net/hiudawn/article/details/79491766
- https://blog.csdn.net/weixin_40671425/article/details/84587762
- https://blog.csdn.net/weixin_41863685/article/details/83214068