First, the preparatory work
(It will be convenient to do only one preparation work)
1. Install Pip
(1) Download Pip to D:\download
Pip:https://pypi.python.org/pypi/pip#downloads
(2) Extract to the current directory after downloading;
(3) "win+r" into cmd; Enter the following code, in turn:
C:\USERS\ADMINISTRATOR>CD D:\download\pip-9.0.1C:\Users\Administrator>D:
D:\download\pip-9.0.1>python setup.py Install
(4) Configure environment variables:
Add the installation path to the PIP in path: The script folder under the Python installation path
(5) Complete
Re-"win+r" into CMD; run the following code directly:
Run: Pip-v or Pip--version, showing the version information of the PIP
2. Installing Wheel
(For offline installation of downloaded WHL files)
"Win+r" into CMD; run the following code directly:
Pip Install Wheel
Ii. installation of third-party libraries
1. Online Installation
Run directly in the CMD window: Pip install package name, such as Pip install requests
Note: This method will automatically download the third-party library, after the installation is completed and will not be deleted, if you want to delete the default download path to it manually deleted;
Win7 default path://AppData may be the default path for the hidden folder \ \ user \ (your user name) \appdata\local\pip\cachelinux:~/.cache /pip
In fact, there is no need to delete the cache, add--no-cache-dir can disable caching
2. Offline installation
(1) Download
In http://www.lfd.uci.edu/~gohlke/pythonlibs/download the. whl file for the required library, note that the cp** in the file name should match the installed version. If you install Python2.7, you should download the corresponding cp27. WHL file
(2) Installation
Run: Pip install **.WHL, if wheel is installed.
3. Unzip the installation
Rename the. WHL suffix to zip, unzip, and put the extracted folder into the python/lib/site-packages.
The simplest way to install third-party libraries in Python