Installation requests, pyquery library

First, install pyquery library

   1. First, you make sure you are equipped with the python on windows.

   2. Install pip and other necessary packages
    (1) download package pip, pip can go to the official website to download (click https://pypi.python.org/pypi/pip#downloads) choose the second download

    (2) enter pip extract the files in the directory with cmd console, install pip with python setup.py install

    (3) pip install wheel click on the link  http://www.lfd.uci.edu/~gohlke/pythonlibs/  , Ctrl + f search libxml2 and lxml, download the corresponding file, enter the file directory with cmd console

   3. Install pyquery

Second, the installation requests library

In the windows system, just enter the command pip install requests, can be installed.

Linux system, need only enter the command sudo pip install requests, to install.
1. Download requests

        Open the site http://www.lfd.uci.edu/~gohlke/pythonlibs on this site with lots of third-party libraries python, we ctrl + f search by easy to find requests. As shown below, then click on the downloaded file whl.

  2. After whl file downloaded, rename the file, change the extension from .whl .zip, and then extract the files, we can get two folders, as shown below, we will first folder, which is requests folder to the lib directory under the python installation directory. 

  3. here, requests have been installed, we can import requests input command to try if the installation was successful, 

    As shown above, no error Import requests, requests instructions have been successfully installed.

Guess you like

Origin www.cnblogs.com/CJR-QYF/p/12001715.html