pip is in a python package management tool, you can find on the Python package, download, install, uninstall role.
yum -y install epel-release yum -y install python-pip
Since the default pip source is abroad, so the download speed will be slower, python pip domestic source configuration
Tsinghua University: https: //pypi.tuna.tsinghua.edu.cn/simple Ali cloud: http: //mirrors.aliyun.com/pypi/simple/ watercress: http: //pypi.douban.com/simple/
Method 1: Use a temporary domestic pypi image installation
-i install numpy http://pypi.douban.com/simple/ PIP PIP install -i http://pypi.douban.com/simple/ --trusted-Host pypi.douban.com # parameter "--trusted -host "expressed confidence that if a prompt is not trusted to use this
Second way: permanent use of domestic pypi image installation
1. Create a file pip.conf
~ mkdir / .pip CD ~ / .pip VI ~ / .pip / pip.conf [Global] index https://pypi.tuna.tsinghua.edu.cn/simple-URL = [the install] Trusted-Host = HTTPS: //pypi.tuna.tsinghua.edu.cn # trusted-host this parameter in order to avoid trouble, or when used may be prompted to untrusted
2, an upgraded version of pip
pip install --upgrade pip
3, see the pip package has been installed
Freeze or pip list PIP // or pip list more commands can be executed pip --help
4, pip-related error
报错一:/usr/lib/python2.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.25.5) or chardet (2.2.1) doesn't match a supported version!
Solution:
pip uninstall urllib3 pip uninstall chardet pip install requests
Error two:
Python: error in moviepy setup command: ‘extras_require’ must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.
解决方法:setuptools版本太旧
pip install --upgrade setuptools