I want to install pyquery on windows. But i cant run setup.py install on the command line. Do you have any hint?
问题:
回答1:
I guess you don't have lxml or setuptools installed
setuptools http://pypi.python.org/pypi/setuptools/0.6c11
lxml http://pypi.python.org/pypi/lxml/2.2.2
Install them first and then try again, I just tried that, its working properly here.
回答2:
I could not install lxml on windows with either pip or easy_install. Complained "Unable to find vcvarsall.bat"
Tried installing Cygwin and MinGW but that was taking way too long
found out from raidsan's answer about unofficial precompiled windows binaries http://www.lfd.uci.edu/~gohlke/pythonlibs/ installed and works fine now
回答3:
SIMPLE WORKING SOLUTION:
I download the tar file here pyquery-1.2.13.tar.gz (https://pypi.python.org/pypi/pyquery#downloads)
I extracted them a folder pyquery-1.2.13 then i pasted myscript.py to this folder pyquery-1.2.13 in my script i have these lines at the very top to include pyquery module and it works!
import pyquery (this file is in pyquery-1.2.13 folder)
from pyquery import *
Done.
回答4:
I'm using miniconda on Windows and here is how I installed pyQuery :
Download python miniconda from http://conda.pydata.org/miniconda.html (if you need many libraries at once, consider installing anadonda instead)
Then from the commandline prompt, run the following commands:
conda install lxml
conda install setuptools
Grab the lastest pyQuery source from https://codeload.github.com/gawel/pyquery/zip/master and unzip it to a directory.
Again from the commandline, go to this directory and run :
python setup.py install