我试着在windows上安装lxml。我运行的是python3.5。我使用了win安装程序,不起作用。它给我一个错误,说找不到Python 3.2。我使用pip或easy_install,它试图安装,然后给我一个错误
C:\Users\>easy_install lxml
Searching for lxml
Reading https://pypi.python.org/simple/lxml/
Best match: lxml 3.5.0
Downloading https://pypi.python.org/packages/source/l/lxml/lxml-3.5.0.tar.gz#md5
=9f0c5f1eb43ff44d5455dab4b4efbe73
Processing lxml-3.5.0.tar.gz
Writing C:\Users\vasisht\AppData\Local\Temp\easy_install-ze62aj3w\lxml-3.5.0\setup.cfg
Running lxml-3.5.0\setup.py -q bdist_egg --dist-dir
C:\Users\...\AppData\Local\Temp\easy_install-ze62aj3w\lxml-3.5.0\egg-dist-tmp-cwiu9v46
Building lxml version 3.5.0.
Building without Cython.
ERROR: b"'xslt-config' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n"
** 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我一直在绞尽脑汁在谷歌上寻找答案。请给我一些启示。谢谢
发布于 2016-02-20 06:15:03
尝试:
lxml包是在Github上的存储库中使用Mercurial和hg-git插件开发的。您可以使用以下命令检索当前的开发人员版本:
hg clone git://github.com/lxml/lxml.git lxml这将创建一个lxml目录并将源代码下载到其中,包括完整的开发历史。别害怕,下载速度相当快。您还可以通过web浏览lxml存储库。
如上所述克隆源代码库(或下载源码tar-ball并解压缩),然后键入:
python setup.py build(c) http://lxml.de/build.html#building-the-sources
您可以使用pip从源代码安装
pip install -e git+git://github.com/lxml/lxml.git#egg=lxml请记住,lxml需要Cython
发布于 2016-10-14 12:43:29
首先安装cpython,(pip install cpython)在错误代码中已经提到python告诉您:错误:B“”xslt-config‘未被识别为内部或外部命令,\r\n可操作的程序或批处理文件。\r\n“
然后是来自http://www.xmlsoft.org/downloads.html的libxml(2)和libxslt
安装lxml (pip install lxml)
只是一个初学者,请尝试一下,它可能对你和其他人都有效。
https://stackoverflow.com/questions/35515975
复制相似问题