Python How to install a third-party class library

Source: Internet
Author: User

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

    1. Download the requests package first https://github.com/kennethreitz/requests
    2. Unzip the downloaded Zip package
    3. Go to the directory with setup.py, cmd with windows
    4. Execute Python setup.py build first
    5. Then execute the python setup.py install
    6. If there is no problem, prompt installation is successful
    7. Create a new test project, import requests

Python How to install a third-party class library

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.