1, first to the official website http://pypi.python.org/pypi/setuptools download Setuptools.exe file and install
2. It is recommended to add D:\Python27\Scripts to the PATH environment variable after installation, and then use the easy_install pip command to install PIP
C:\windows\system32>Easy_install pipsearching forpipbest Match:pip1.5.6processing pip-1.5.6-py2.7. Eggpip1.5.6 is already the active versionincheasy-install.pthinstalling Pip-script.py script to D:\Python27\ScriptsInstalling pip.exe script to D:\Python27\ScriptsInstalling pip.exe.manifest Script to D:\Python27\ScriptsInstalling PIP2.7-script.py script to D:\Python27\ScriptsInstalling PIP2.7. exe script to D:\Python27\ScriptsInstalling PIP2.7. exe.manifest script to D:\Python27\ScriptsInstalling PIP2-script.py script to D:\Python27\ScriptsInstalling pip2.exe script to D:\Python27\ScriptsInstalling Pip2.exe.manifest script to D:\Python27\ScriptsUsing d:\python27\lib\site-packages\pip-1.5.6-py2.7. eggprocessing Dependencies forpipfinished processing Dependencies forPip
Install Python third-party requests class library with Watercress source
C:\windows\system32>pip Install requests-i http://pypi.douban.com/simple/downloading/ Unpacking Requests http://pypi.douban.com/simple/requests/uses An insecure transport scheme ( HTTIf pypi.douban.com has it availableinstalling collected packages:requestssuccessfully installed Requestscleaning up ...
Other uses of PIP:
Pip Install-u Package name (class requests)--Update Requests class Library
Pip UNINTSLL Package name (class requests)--Delete requests class Library
PIP Search Package name (class requests)--Search Requests Class Library
Pip Help
For example: manual installation of requests
- Download the requests package first https://github.com/kennethreitz/requests
- Unzip the downloaded Zip package
- Go to the directory with setup.py, cmd with windows
- Execute Python setup.py build first
- Then execute the python setup.py install
- If there is no problem, prompt installation is successful
- Create a new test project, import requests
Python How to install a third-party class library