win10 下安装python的 lxml库总是失败,我的python3.4.4

ghostxnet 2016-03-19 08:37:16
1.pip install lxml
显示下面错误
C:\Users\zhanghongfu>pip list
beautifulsoup4 (4.4.1)
pip (7.1.2)
pycurl (7.43.0)
requests (2.9.1)
setuptools (18.2)
wheel (0.29.0)
You are using pip version 7.1.2, however version 8.1.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

C:\Users\zhanghongfu>pip install lxml
Collecting lxml
Using cached lxml-3.6.0.tar.gz
Building wheels for collected packages: lxml
Running setup.py bdist_wheel for lxml
Complete output from command c:\python34\python.exe -c "import setuptools;__file__='C:\\Users\\ZHANGH~1\\AppData\\Local\\Temp\\pip-build-hsbnzz88\\lxml\\setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d C:\Users\ZHANGH~1\AppData\Local\Temp\tmpv9yam379pip-wheel-:
Building lxml version 3.6.0.
Building without Cython.
ERROR: b"'xslt-config' \xb2\xbb\xca\xc7\xc4\xda\xb2\xbf\xbb\xf2\xcd\xe2\xb2\xbf\xc3\xfc\xc1\xee\xa3\xac\xd2\xb2\xb2\xbb\xca\xc7\xbf\xc9\xd4\xcb\xd0\xd0\xb5\xc4\xb3\xcc\xd0\xf2\r\n\xbb\xf2\xc5\xfa\xb4\xa6\xc0\xed\xce\xc4\xbc\xfe\xa1\xa3\r\n"
** make sure the development packages of libxml2 and libxslt are installed **

Using build configuration of libxslt
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.4
creating build\lib.win-amd64-3.4\lxml
copying src\lxml\builder.py -> build\lib.win-amd64-3.4\lxml
copying src\lxml\cssselect.py -> build\lib.win-amd64-3.4\lxml
copying src\lxml\doctestcompare.py -> build\lib.win-amd64-3.4\lxml
copying src\lxml\ElementInclude.py -> build\lib.win-amd64-3.4\lxml
copying src\lxml\pyclasslookup.py -> build\lib.win-amd64-3.4\lxml
copying src\lxml\sax.py -> build\lib.win-amd64-3.4\lxml
copying src\lxml\usedoctest.py -> build\lib.win-amd64-3.4\lxml
copying src\lxml\_elementpath.py -> build\lib.win-amd64-3.4\lxml
copying src\lxml\__init__.py -> build\lib.win-amd64-3.4\lxml
creating build\lib.win-amd64-3.4\lxml\includes
copying src\lxml\includes\__init__.py -> build\lib.win-amd64-3.4\lxml\includes
creating build\lib.win-amd64-3.4\lxml\html
copying src\lxml\html\builder.py -> build\lib.win-amd64-3.4\lxml\html
copying src\lxml\html\clean.py -> build\lib.win-amd64-3.4\lxml\html
copying src\lxml\html\defs.py -> build\lib.win-amd64-3.4\lxml\html
copying src\lxml\html\diff.py -> build\lib.win-amd64-3.4\lxml\html
copying src\lxml\html\ElementSoup.py -> build\lib.win-amd64-3.4\lxml\html
copying src\lxml\html\formfill.py -> build\lib.win-amd64-3.4\lxml\html
copying src\lxml\html\html5parser.py -> build\lib.win-amd64-3.4\lxml\html
copying src\lxml\html\soupparser.py -> build\lib.win-amd64-3.4\lxml\html
copying src\lxml\html\usedoctest.py -> build\lib.win-amd64-3.4\lxml\html
copying src\lxml\html\_diffcommand.py -> build\lib.win-amd64-3.4\lxml\html
copying src\lxml\html\_html5builder.py -> build\lib.win-amd64-3.4\lxml\html
copying src\lxml\html\_setmixin.py -> build\lib.win-amd64-3.4\lxml\html
copying src\lxml\html\__init__.py -> build\lib.win-amd64-3.4\lxml\html
creating build\lib.win-amd64-3.4\lxml\isoschematron
copying src\lxml\isoschematron\__init__.py -> build\lib.win-amd64-3.4\lxml\isoschematron
copying src\lxml\lxml.etree.h -> build\lib.win-amd64-3.4\lxml
copying src\lxml\lxml.etree_api.h -> build\lib.win-amd64-3.4\lxml
copying src\lxml\includes\c14n.pxd -> build\lib.win-amd64-3.4\lxml\includes
copying src\lxml\includes\config.pxd -> build\lib.win-amd64-3.4\lxml\includes
copying src\lxml\includes\dtdvalid.pxd -> build\lib.win-amd64-3.4\lxml\includes
copying src\lxml\includes\etreepublic.pxd -> build\lib.win-amd64-3.4\lxml\includes
copying src\lxml\includes\htmlparser.pxd -> build\lib.win-amd64-3.4\lxml\includes
copying src\lxml\includes\relaxng.pxd -> build\lib.win-amd64-3.4\lxml\includes
copying src\lxml\includes\schematron.pxd -> build\lib.win-amd64-3.4\lxml\includes
copying src\lxml\includes\tree.pxd -> build\lib.win-amd64-3.4\lxml\includes
copying src\lxml\includes\uri.pxd -> build\lib.win-amd64-3.4\lxml\includes
copying src\lxml\includes\xinclude.pxd -> build\lib.win-amd64-3.4\lxml\includes
copying src\lxml\includes\xmlerror.pxd -> build\lib.win-amd64-3.4\lxml\includes
copying src\lxml\includes\xmlparser.pxd -> build\lib.win-amd64-3.4\lxml\includes
copying src\lxml\includes\xmlschema.pxd -> build\lib.win-amd64-3.4\lxml\includes
copying src\lxml\includes\xpath.pxd -> build\lib.win-amd64-3.4\lxml\includes
copying src\lxml\includes\xslt.pxd -> build\lib.win-amd64-3.4\lxml\includes
copying src\lxml\includes\etree_defs.h -> build\lib.win-amd64-3.4\lxml\includes
copying src\lxml\includes\lxml-version.h -> build\lib.win-amd64-3.4\lxml\includes
creating build\lib.win-amd64-3.4\lxml\isoschematron\resources
creating build\lib.win-amd64-3.4\lxml\isoschematron\resources\rng
copying src\lxml\isoschematron\resources\rng\iso-schematron.rng -> build\lib.win-amd64-3.4\lxml\isoschematron\resources\rng
creating build\lib.win-amd64-3.4\lxml\isoschematron\resources\xsl
copying src\lxml\isoschematron\resources\xsl\RNG2Schtrn.xsl -> build\lib.win-amd64-3.4\lxml\isoschematron\resources\xsl
copying src\lxml\isoschematron\resources\xsl\XSD2Schtrn.xsl -> build\lib.win-amd64-3.4\lxml\isoschematron\resources\xsl
creating build\lib.win-amd64-3.4\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_abstract_expand.xsl -> build\lib.win-amd64-3.4\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_dsdl_include.xsl -> build\lib.win-amd64-3.4\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_message.xsl -> build\lib.win-amd64-3.4\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_skeleton_for_xslt1.xsl -> build\lib.win-amd64-3.4\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_svrl_for_xslt1.xsl -> build\lib.win-amd64-3.4\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt -> build\lib.win-amd64-3.4\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).

----------------------------------------
Failed building wheel for lxml
Failed to build lxml
Installing collected packages: lxml
Running setup.py install for lxml
Complete output from command c:\python34\python.exe -c "import setuptools, tokenize;__file__='C:\\Users\\ZHANGH~1\\AppData\\Local\\Temp\\pip-build-hsbnzz88\\lxml\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\ZHANGH~1\AppData\Local\Temp\pip-vyj_xuxu-record\install-record.txt --single-version-externally-managed --compile:
Building lxml version 3.6.0.
Building without Cython.
ERROR: b"'xslt-config' \xb2\xbb\xca\xc7\xc4\xda\xb2\xbf\xbb\xf2\xcd\xe2\xb2\xbf\xc3\xfc\xc1\xee\xa3\xac\xd2\xb2\xb2\xbb\xca\xc7\xbf\xc9\xd4\xcb\xd0\xd0\xb5\xc4\xb3\xcc\xd0\xf2\r\n\xbb\xf2\xc5\xfa\xb4\xa6\xc0\xed\xce\xc4\xbc\xfe\xa1\xa3\r\n"
** make sure the development packages of libxml2 and libxslt are installed **

Using build configuration of libxslt
running install
running build
running build_py
copying src\lxml\includes\lxml-version.h -> build\lib.win-amd64-3.4\lxml\includes
running build_ext
building 'lxml.etree' extension
error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).

----------------------------------------
Command "c:\python34\python.exe -c "import setuptools, tokenize;__file__='C:\\Users\\ZHANGH~1\\AppData\\Local\\Temp\\pip-build-hsbnzz88\\lxml\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\ZHANGH~1\AppData\Local\Temp\pip-vyj_xuxu-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\ZHANGH~1\AppData\Local\Temp\pip-build-hsbnzz88\lxml
You are using pip version 7.1.2, however version 8.1.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

2.lxml 3.4.4 32位64位都试过
3.下载 lxml.whl 文件也不行
4.网上说的方法都试过,不行.

求解决方法谢谢
...全文
941 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
Slias 2020-01-31
  • 打赏
  • 举报
回复
C:\Users\Hasee\AppData\Local\Temp\xmlXPathInit2r6pgbut.c(1): fatal error C1083: Cannot open include file: 'libxml/xpath.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
*********************************************************************************
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
*********************************************************************************
Slias 2020-01-31
  • 打赏
  • 举报
回复
lxml安装成功了,但是pycharm里提示错误,楼主解决了么、?
Slias 2020-01-31
  • 打赏
  • 举报
回复
不能安装啊ERROR: b"'xslt-config' \xb2\xbb\xca\xc7\xc4\xda\xb2\xbf\xbb\xf2\xcd\xe2\xb2\xbf\xc3\xfc\xc1\xee\xa3\xac\xd2\xb2\xb2\xbb\xca\xc7\xbf\xc9\xd4\xcb\xd0\xd0\xb5\xc4\xb3\xcc\xd0\xf2\r\n\xbb\xf2\xc5\xfa\xb4\xa6\xc0\xed\xce\xc4\xbc\xfe\xa1\xa3\r\n"
enol-stark 2018-03-19
  • 打赏
  • 举报
回复
为什么我一直安装失败各种方法都试了
ghostxnet 2016-03-22
  • 打赏
  • 举报
回复
直接进入到 lxml-3.6.0-cp34-cp34m-win_amd64.whl 目录 pip install lxml-3.6.0-cp34-cp34m-win_amd64.whl 安装成功

37,719

社区成员

发帖
与我相关
我的任务
社区描述
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
社区管理员
  • 脚本语言(Perl/Python)社区
  • IT.BOB
加入社区
  • 近7日
  • 近30日
  • 至今

试试用AI创作助手写篇文章吧