The first thing to make clear before installing pyquery is that Easyinstall is a Python package manager, similar to node's NPM, for installing Python's expansion pack, which installs packages in a *.egg way.
To install the PQ you need to go through the following steps:
1: Download Easyinstall
Website
Set environment variables, add Python directory to path, switch to py directory in cmd
Python ez_setup.py
Waiting to download and install Setuptools
2: Set easy_install environment variable
Add C:\Python27\Scripts to the environment variable (each time you set the environment variable, you need to reopen cmd to execute easy_install)
3: Install Pyquery Dependency Packagelxml
You can find the relevant version of the package through the official website
And then execute
?
1 |
easy_install lxml-2.3-py2.7-win32 |
If this step hint easy_install is not an internal command, the reason is not to join the environment variable or not to re-open the cmd window, of course, if the lazy words directly to write the directory
If the installation process has been encountered
You can download the egg and then use the Easy_install directly to install the egg in the directory
4: Install Pyquery
Online Installation:
Easy_install Pyquery
Offline Installation:
Website
Switch to the directory after the download is complete
?
1 |
easy_install pyquery-1.2.4 |
5: Test
Execute on the python command line
Import Pyquery;
From:http://www.cnblogs.com/god-shell/p/3655939.html
Install pyquery under Windows python