方法一
安装setup-tools
linux-oz6w:~
linux-oz6w:~
linux-oz6w:~
linux-oz6w:~
安装pip
linux-oz6w:~
..........
creating /usr/lib/python2.7/site-packages/pip-20.2.4-py2.7.egg
Extracting pip-20.2.4-py2.7.egg to /usr/lib/python2.7/site-packages
Adding pip 20.2.4 to easy-install.pth file
Installing pip script to /usr/bin
Installing pip2.7 script to /usr/bin
Installing pip2 script to /usr/bin
Installed /usr/lib/python2.7/site-packages/pip-20.2.4-py2.7.egg
Processing dependencies for pip==20.2.4
Finished processing dependencies for pip==20.2.4
方法二
linux-oz6w:~
linux-oz6w:~
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/
Collecting pip
Downloading pip-20.3.1-py2.py3-none-any.whl (1.5 MB)
|████████████████████████████████| 1.5 MB 3.5 MB/s
Collecting setuptools
Downloading setuptools-44.1.1-py2.py3-none-any.whl (583 kB)
|████████████████████████████████| 583 kB 6.0 MB/s
Collecting wheel
Downloading wheel-0.36.0-py2.py3-none-any.whl (34 kB)
Installing collected packages: pip, setuptools, wheel
Successfully installed pip-20.3.1 setuptools-44.1.1 wheel-0.36.0
配置阿里云pip源
linux-oz6w:~
linux-oz6w:~
[global]
trusted-host=mirrors.aliyun.com
index-url=https://mirrors.aliyun.com/pypi/simple/
EOF
pip安装pyotp
linux-oz6w:~
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting pyotp
Downloading https://mirrors.aliyun.com/pypi/packages/6f/5f/b8b985153df5516386e2918ab97ac836abfe88dc420cd3211d7b9e30814e/pyotp-2.4.1-py2.py3-none-any.whl (11 kB)
Installing collected packages: pyotp
Successfully installed pyotp-2.4.1