windows安装libxslt_在Windows 10上安装Python3.5的lxml、libxml2和libxslt

在Windows 10上安装Python3.5的lxml时遇到错误,'xslt-config' 命令未被识别,且libxml2和libxslt的开发包似乎缺失。尝试通过pip安装libxml2和libxslt失败,源代码构建lxml也因依赖问题未成功。
摘要由CSDN通过智能技术生成

我首先尝试为它运行基本的pip install命令:C:\Program Files (x86)\Python35-32>pip install lxml

Collecting lxml

Using cached lxml-3.6.4.tar.gz

Building wheels for collected packages: lxml

Running setup.py bdist_wheel for lxml ... error

Complete output from command "c:\program files (x86)\python35-32\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\Djidiouf\\AppData\\Local\\Temp\\pip-build-ovqa6ncd\\lxml\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\Djidiouf\AppData\Local\Temp\tmp9hzx5gztpip-wheel- --python-tag cp35:

Building lxml version 3.6.4.

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 **

C:\Users\Djidiouf\AppData\Local\Temp\xmlXPathInitbqgvj3pt.c(1): fatal error C1083: Cannot open include file: 'libxml/xpath.h': No such file or directory

*********************************************************************************

Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?

*********************************************************************************

error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2

----------------------------------------

Command ""c:\program files (x86)\python35-32\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\Djidiouf\\AppData\\Local\\Temp\\pip-build-ovqa6ncd\\lxml\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Djidiouf\AppData\Local\Temp\pip-kk7fdpzx-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Djidiouf\AppData\Local\Temp\pip-build-ovqa6ncd\lxml\

我试图安装libxml2:C:\Program Files (x86)\Python35-32>pip install libxml2

Collecting libxml2

Could not find a version that satisfies the requirement libxml2 (from versions: )

No matching distribution found for libxml2

我还尝试安装libxslt:C:\Program Files (x86)\Python35-32>pip install libxslt

Collecting libxslt

Could not find a version that satisfies the requirement libxslt (from versions: )

No matching distribution found for libxslt

我还试图从源代码(https://github.com/lxml/lxml)构建lxml,但它也需要libxml2依赖项。C:\Program Files (x86)\Python35-32>pip install C:\Users\Djidiouf\Downloads\lxml-3.6.4-cp35-cp35m-win_amd64.whl

lxml-3.6.4-cp35-cp35m-win_amd64.whl is not a supported wheel on this platform.

这个控制盘文件似乎不支持Windows10或Python3.5。

任何帮助都将不胜感激。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值