Python pip安装lxml出错的问题解决办法
1. 在使用pip安装lxml过程中出现了一下错误:
> pip install lxml
C:\Users\Chen>pip install lxml Collecting lxml Using cached lxml-3.5.0.tar.gz Installing collected packages: lxml Running setup.py install for lxml ... error Complete output from command "d:\program files\python\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\CHENJU~1\\AppData\\Local\\Temp\\pip-build-id5180h6\\lxml\\setup.py'; Building lxml version 3.5.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\xc ** make sure the development packages of libxml2 and libxslt are installed ** Using build configuration of libxslt running install running build running build_py creating build creating build\lib.win32-3.5 creating build\lib.win32-3.5\lxml copying src\lxml\builder.py -> build\lib.win32-3.5\lxml copying src\lxml\cssselect.py -> build\lib.win32-3.5\lxml copying src\lxml\doctestcompare.py -> build\lib.win32-3.5\lxml copying src\lxml\ElementInclude.py -> build\lib.win32-3.5\lxml copying src\lxml\pyclasslookup.py -> build\lib.win32-3.5\lxml copying src\lxml\sax.py -> build\lib.win32-3.5\lxml copying src\lxml\usedoctest.py -> build\lib.win32-3.5\lxml copying src\lxml\_elementpath.py -> build\lib.win32-3.5\lxml copying src\lxml\__init__.py -> build\lib.win32-3.5\lxml creating build\lib.win32-3.5\lxml\includes copying src\lxml\includes\__init__.py -> build\lib.win32-3.5\lxml\includes creating build\lib.win32-3.5\lxml\html copying src\lxml\html\builder.py -> build\lib.win32-3.5\lxml\html copying src\lxml\html\clean.py -> build\lib.win32-3.5\lxml\html copying src\lxml\html\defs.py -> build\lib.win32-3.5\lxml\html copying src\lxml\html\diff.py -> build\lib.win32-3.5\lxml\html copying src\lxml\html\ElementSoup.py -> build\lib.win32-3.5\lxml\html copying src\lxml\html\formfill.py -> build\lib.win32-3.5\lxml\html copying src\lxml\html\html5parser.py -> build\lib.win32-3.5\lxml\html copying src\lxml\html\soupparser.py -> build\lib.win32-3.5\lxml\html copying src\lxml\html\usedoctest.py -> build\lib.win32-3.5\lxml\html copying src\lxml\html\_diffcommand.py -> build\lib.win32-3.5\lxml\html copying src\lxml\html\_html5builder.py -> build\lib.win32-3.5\lxml\html copying src\lxml\html\_setmixin.py -> build\lib.win32-3.5\lxml\html copying src\lxml\html\__init__.py -> build\lib.win32-3.5\lxml\html creating build\lib.win32-3.5\lxml\isoschematron copying src\lxml\isoschematron\__init__.py -> build\lib.win32-3.5\lxml\isoschematron copying src\lxml\lxml.etree.h -> build\lib.win32-3.5\lxml copying src\lxml\lxml.etree_api.h -> build\lib.win32-3.5\lxml copying src\lxml\includes\c14n.pxd -> build\lib.win32-3.5\lxml\includes copying src\lxml\includes\config.pxd -> build\lib.win32-3.5\lxml\includes copying src\lxml\includes\dtdvalid.pxd -> build\lib.win32-3.5\lxml\includes copying src\lxml\includes\etreepublic.pxd -> build\lib.win32-3.5\lxml\includes copying src\lxml\includes\htmlparser.pxd -> build\lib.win32-3.5\lxml\includes copying src\lxml\includes\relaxng.pxd -> build\lib.win32-3.5\lxml\includes copying src\lxml\includes\schematron.pxd -> build\lib.win32-3.5\lxml\includes copying src\lxml\includes\tree.pxd -> build\lib.win32-3.5\lxml\includes copying src\lxml\includes\uri.pxd -> build\lib.win32-3.5\lxml\includes copying src\lxml\includes\xinclude.pxd -> build\lib.win32-3.5\lxml\includes copying src\lxml\includes\xmlerror.pxd -> build\lib.win32-3.5\lxml\includes copying src\lxml\includes\xmlparser.pxd -> build\lib.win32-3.5\lxml\includes copying src\lxml\includes\xmlschema.pxd -> build\lib.win32-3.5\lxml\includes copying src\lxml\includes\xpath.pxd -> build\lib.win32-3.5\lxml\includes copying src\lxml\includes\xslt.pxd -> build\lib.win32-3.5\lxml\includes copying src\lxml\includes\etree_defs.h -> build\lib.win32-3.5\lxml\includes copying src\lxml\includes\lxml-version.h -> build\lib.win32-3.5\lxml\includes creating build\lib.win32-3.5\lxml\isoschematron\resources creating build\lib.win32-3.5\lxml\isoschematron\resources\rng copying src\lxml\isoschematron\resources\rng\iso-schematron.rng -> build\lib.win32-3.5\lxml\isoschematron\resources\rng creating build\lib.win32-3.5\lxml\isoschematron\resources\xsl copying src\lxml\isoschematron\resources\xsl\RNG2Schtrn.xsl -> build\lib.win32-3.5\lxml\isoschematron\resources\xsl copying src\lxml\isoschematron\resources\xsl\XSD2Schtrn.xsl -> build\lib.win32-3.5\lxml\isoschematron\resources\xsl creating build\lib.win32-3.5\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_abstract_expand.xsl -> build\lib.win32-3.5\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_dsdl_include.xsl -> build\lib.win32-3.5\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_message.xsl -> build\lib.win32-3.5\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_skeleton_for_xslt1.xsl -> build\lib.win32-3.5\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_svrl_for_xslt1.xsl -> build\lib.win32-3.5\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt -> build\lib.win32-3.5\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 running build_ext building 'lxml.etree' extension error: Unable to find vcvarsall.bat ----------------------------------------
2. Baidu一下看看问题如何解决:
原来这个问题,还是需要区分操作系统来分别处理的。window下暂无涉及。
3. Linux系统的处理方式:
sudo apt-get install python-dev libxml2-dev libxslt1-dev zlib1g-dev
or yum install .....
然后继续使用 pip install lxml
感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
暂无评论...
更新日志
2024年11月25日
2024年11月25日
- 凤飞飞《我们的主题曲》飞跃制作[正版原抓WAV+CUE]
- 刘嘉亮《亮情歌2》[WAV+CUE][1G]
- 红馆40·谭咏麟《歌者恋歌浓情30年演唱会》3CD[低速原抓WAV+CUE][1.8G]
- 刘纬武《睡眠宝宝竖琴童谣 吉卜力工作室 白噪音安抚》[320K/MP3][193.25MB]
- 【轻音乐】曼托凡尼乐团《精选辑》2CD.1998[FLAC+CUE整轨]
- 邝美云《心中有爱》1989年香港DMIJP版1MTO东芝首版[WAV+CUE]
- 群星《情叹-发烧女声DSD》天籁女声发烧碟[WAV+CUE]
- 刘纬武《睡眠宝宝竖琴童谣 吉卜力工作室 白噪音安抚》[FLAC/分轨][748.03MB]
- 理想混蛋《Origin Sessions》[320K/MP3][37.47MB]
- 公馆青少年《我其实一点都不酷》[320K/MP3][78.78MB]
- 群星《情叹-发烧男声DSD》最值得珍藏的完美男声[WAV+CUE]
- 群星《国韵飘香·贵妃醉酒HQCD黑胶王》2CD[WAV]
- 卫兰《DAUGHTER》【低速原抓WAV+CUE】
- 公馆青少年《我其实一点都不酷》[FLAC/分轨][398.22MB]
- ZWEI《迟暮的花 (Explicit)》[320K/MP3][57.16MB]