我有 Python 2.7,我正在尝试使用 PyQuery,所以对于测试,我只输入了“import PyQuery”,但出现错误:
Traceback (most recent call last):
File "C:\Users\Jacob\Documents\dupes.py", line 1, in <module>
import pyquery
File "C:\Python27\lib\site-packages\pyquery-1.2.1-py2.7.egg\pyquery\__init__.py", line 12, in <module>
from .pyquery import PyQuery
File "C:\Python27\lib\site-packages\pyquery-1.2.1-py2.7.egg\pyquery\pyquery.py", line 8, in <module>
from lxml import etree
ImportError: No module named lxml
所以我去命令提示符并尝试安装lxml,但我得到了这个:
Building lxml version 2.3.5.
Building without Cython.
ERROR: 'xslt-config' is not recognized as an internal or external command,
operable program or batch file.
** make sure the development packages of libxml2 and libxslt are installed **
Using build configuration of libxslt
error: Setup script exited with error: Unable to find vcvarsall.bat
我真的不明白出了什么问题或我应该做什么......有人可以帮忙吗?
谢谢。
编辑:
为了回应评论,我使用了简单的安装...