python winthows下安装lxml失败解决方法

作者:盐城市天行软件有限公司  来源:www.szgjp.com未知  发布时间:2017-09-08 22:07:26
python winthows下安装lxml失败解决方法

python winthows下安装lxml失败解决方法:安装lxml总是失败解决方法

失败提示如下:

running build_ext building 'lxml.etree' extension creating build\temp.win-amd64-2.7 creating build\temp.win-amd64-2.7\Release creating build\temp.win-amd64-2.7\Release\src creating build\temp.win-amd64-2.7\Release\src\lxml C:\Users\wenshiwei\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Isrc\lxml\inc ludes -Ic:\apps\tools\python27\include -Ic:\apps\tools\python27\PC /Tcsrc\lxml\lxml.etree.c /Fobuild\temp.win-amd64-2.7\Release\src\lxml\lxml.etree.obj -w cl : Command line warning D9025 : overriding '/W3' with '/w' lxml.etree.c src\lxml\includes\etree_defs.h(14) : fatal error C1083: Cannot open include file: 'libxml/xmlversion.h': No such file or directory Compile failed: command 'C:\\Users\\wenshiwei\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2 C:\Users\wenshiwei\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -I/usr/include /libxml2 /Tcc:\users\wenshi~1\appdata\local\temp\xmlXPathInitqpboxi.c /Fousers\wenshi~1\appdata\local\temp\xmlXPathInitqpboxi.obj xmlXPathInitqpboxi.c c:\users\wenshi~1\appdata\local\temp\xmlXPathInitqpboxi.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:\\Users\\wenshiwei\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit stat us 2 ---------------------------------------- Command "c:\apps\tools\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\wenshi~1\\appdata\\local\\temp\\pip-build-mavckn\\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\ wenshi~1\appdata\local\temp\pip-jal9v1-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\wenshi~1\ap pdata\local\temp\pip-build-mavckn\lxml\ 如果安装了VC++一样失败, 可以试试使用 wheel 安装, 已经被编绎过的

pip install wheel

接着下载 相应的.whl包

企业建站2800元起,携手武汉肥猫科技,做一个有见地的颜值派!更多优惠请戳:孝感SEO http://xiaogan.raoyu.net


上一篇:WPF( 数据验证)
下一篇:最后一页