First, install and modify environment variables
The version I installed is PYTHON-2.7.15.AMD64 because the PIP will be installed in the version after 2.7.9. Add the folder where Python executes files to the path path, C:\Python27. Add the path where the pip execution file is located, C:\Python27\Scripts to the path path.
Verify:
>python-2.7. >pip-9.0. 3 2.7)
Second, modify the PIP source
Default access to foreign sources when installing dependent packages with Pip: https://pypi.python.org/simple/, but often instability and very slow access, it needs to be replaced with a more stable source in the country.
Windows system, the method is to create a PIP directory in the user directory, such as: C:\Users\xx (user name) \pip, new file Pip.ini, the contents are as follows:
[global]index-url = https://pypi.tuna.tsinghua.edu.cn/simple
I use is Tsinghua's PIP source, it is the official website PyPI The Mirror, synchronizes every 5 minutes.
Three, Pip common commands
Install: Pip Install package name
Pip Install XXX.WHL (offline installation)
Uninstall: Pip Uninstall package name
Upgrade: Pip Install--upgrade package name
Iv. references
1. Change PIP source to domestic mirror, significantly increase download speed
2. Python's WHL file installation
Python 2.7 Environment Setup