【发布时间】:2012-08-07 02:48:42
【问题描述】:
我有 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
我真的不明白出了什么问题或我应该怎么做...有人可以帮忙吗?
谢谢。
编辑:
针对评论,我使用了简易安装...
【问题讨论】:
-
你是如何尝试安装 lxml 的?