文章详情

短信预约-IT技能 免费直播动态提醒

请输入下面的图形验证码

提交验证

短信预约提醒成功

Python pip安装lxml出错的问题解决办法

2022-06-04 18:33

关注

Python pip安装lxml出错的问题解决办法

1. 在使用pip安装lxml过程中出现了一下错误:

>>> pip install lxml


C:UsersChen>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 filespythonpython.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' xb2xbbxcaxc7xc4xdaxb2xbfxbbxf2xcdxe2xb2xbfxc3xfcxc1xeexa3xacxd2xb2xb2xbbxcaxc7xbfxc9xd4xcbxd0xd0xb5xc4xb3xccxd0xf2rnxbbxf2xc 
  ** 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 buildlib.win32-3.5 
  creating buildlib.win32-3.5lxml 
  copying srclxmlbuilder.py -> buildlib.win32-3.5lxml 
  copying srclxmlcssselect.py -> buildlib.win32-3.5lxml 
  copying srclxmldoctestcompare.py -> buildlib.win32-3.5lxml 
  copying srclxmlElementInclude.py -> buildlib.win32-3.5lxml 
  copying srclxmlpyclasslookup.py -> buildlib.win32-3.5lxml 
  copying srclxmlsax.py -> buildlib.win32-3.5lxml 
  copying srclxmlusedoctest.py -> buildlib.win32-3.5lxml 
  copying srclxml_elementpath.py -> buildlib.win32-3.5lxml 
  copying srclxml__init__.py -> buildlib.win32-3.5lxml 
  creating buildlib.win32-3.5lxmlincludes 
  copying srclxmlincludes__init__.py -> buildlib.win32-3.5lxmlincludes 
  creating buildlib.win32-3.5lxmlhtml 
  copying srclxmlhtmlbuilder.py -> buildlib.win32-3.5lxmlhtml 
  copying srclxmlhtmlclean.py -> buildlib.win32-3.5lxmlhtml 
  copying srclxmlhtmldefs.py -> buildlib.win32-3.5lxmlhtml 
  copying srclxmlhtmldiff.py -> buildlib.win32-3.5lxmlhtml 
  copying srclxmlhtmlElementSoup.py -> buildlib.win32-3.5lxmlhtml 
  copying srclxmlhtmlformfill.py -> buildlib.win32-3.5lxmlhtml 
  copying srclxmlhtmlhtml5parser.py -> buildlib.win32-3.5lxmlhtml 
  copying srclxmlhtmlsoupparser.py -> buildlib.win32-3.5lxmlhtml 
  copying srclxmlhtmlusedoctest.py -> buildlib.win32-3.5lxmlhtml 
  copying srclxmlhtml_diffcommand.py -> buildlib.win32-3.5lxmlhtml 
  copying srclxmlhtml_html5builder.py -> buildlib.win32-3.5lxmlhtml 
  copying srclxmlhtml_setmixin.py -> buildlib.win32-3.5lxmlhtml 
  copying srclxmlhtml__init__.py -> buildlib.win32-3.5lxmlhtml 
  creating buildlib.win32-3.5lxmlisoschematron 
  copying srclxmlisoschematron__init__.py -> buildlib.win32-3.5lxmlisoschematron 
  copying srclxmllxml.etree.h -> buildlib.win32-3.5lxml 
  copying srclxmllxml.etree_api.h -> buildlib.win32-3.5lxml 
  copying srclxmlincludesc14n.pxd -> buildlib.win32-3.5lxmlincludes 
  copying srclxmlincludesconfig.pxd -> buildlib.win32-3.5lxmlincludes 
  copying srclxmlincludesdtdvalid.pxd -> buildlib.win32-3.5lxmlincludes 
  copying srclxmlincludesetreepublic.pxd -> buildlib.win32-3.5lxmlincludes 
  copying srclxmlincludeshtmlparser.pxd -> buildlib.win32-3.5lxmlincludes 
  copying srclxmlincludesrelaxng.pxd -> buildlib.win32-3.5lxmlincludes 
  copying srclxmlincludesschematron.pxd -> buildlib.win32-3.5lxmlincludes 
  copying srclxmlincludestree.pxd -> buildlib.win32-3.5lxmlincludes 
  copying srclxmlincludesuri.pxd -> buildlib.win32-3.5lxmlincludes 
  copying srclxmlincludesxinclude.pxd -> buildlib.win32-3.5lxmlincludes 
  copying srclxmlincludesxmlerror.pxd -> buildlib.win32-3.5lxmlincludes 
  copying srclxmlincludesxmlparser.pxd -> buildlib.win32-3.5lxmlincludes 
  copying srclxmlincludesxmlschema.pxd -> buildlib.win32-3.5lxmlincludes 
  copying srclxmlincludesxpath.pxd -> buildlib.win32-3.5lxmlincludes 
  copying srclxmlincludesxslt.pxd -> buildlib.win32-3.5lxmlincludes 
  copying srclxmlincludesetree_defs.h -> buildlib.win32-3.5lxmlincludes 
  copying srclxmlincludeslxml-version.h -> buildlib.win32-3.5lxmlincludes 
  creating buildlib.win32-3.5lxmlisoschematronresources 
  creating buildlib.win32-3.5lxmlisoschematronresourcesrng 
  copying srclxmlisoschematronresourcesrngiso-schematron.rng -> buildlib.win32-3.5lxmlisoschematronresourcesrng 
  creating buildlib.win32-3.5lxmlisoschematronresourcesxsl 
  copying srclxmlisoschematronresourcesxslRNG2Schtrn.xsl -> buildlib.win32-3.5lxmlisoschematronresourcesxsl 
  copying srclxmlisoschematronresourcesxslXSD2Schtrn.xsl -> buildlib.win32-3.5lxmlisoschematronresourcesxsl 
  creating buildlib.win32-3.5lxmlisoschematronresourcesxsliso-schematron-xslt1 
  copying srclxmlisoschematronresourcesxsliso-schematron-xslt1iso_abstract_expand.xsl -> buildlib.win32-3.5lxmlisoschematronresourcesxsliso-schematron-xslt1 
  copying srclxmlisoschematronresourcesxsliso-schematron-xslt1iso_dsdl_include.xsl -> buildlib.win32-3.5lxmlisoschematronresourcesxsliso-schematron-xslt1 
  copying srclxmlisoschematronresourcesxsliso-schematron-xslt1iso_schematron_message.xsl -> buildlib.win32-3.5lxmlisoschematronresourcesxsliso-schematron-xslt1 
  copying srclxmlisoschematronresourcesxsliso-schematron-xslt1iso_schematron_skeleton_for_xslt1.xsl -> buildlib.win32-3.5lxmlisoschematronresourcesxsliso-schematron-xslt1 
  copying srclxmlisoschematronresourcesxsliso-schematron-xslt1iso_svrl_for_xslt1.xsl -> buildlib.win32-3.5lxmlisoschematronresourcesxsliso-schematron-xslt1 
  copying srclxmlisoschematronresourcesxsliso-schematron-xslt1readme.txt -> buildlib.win32-3.5lxmlisoschematronresourcesxsliso-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

感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!

阅读原文内容投诉

免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

软考中级精品资料免费领

  • 历年真题答案解析
  • 备考技巧名师总结
  • 高频考点精准押题
  • 2024年上半年信息系统项目管理师第二批次真题及答案解析(完整版)

    难度     813人已做
    查看
  • 【考后总结】2024年5月26日信息系统项目管理师第2批次考情分析

    难度     354人已做
    查看
  • 【考后总结】2024年5月25日信息系统项目管理师第1批次考情分析

    难度     318人已做
    查看
  • 2024年上半年软考高项第一、二批次真题考点汇总(完整版)

    难度     435人已做
    查看
  • 2024年上半年系统架构设计师考试综合知识真题

    难度     224人已做
    查看

相关文章

发现更多好内容

猜你喜欢

AI推送时光机
位置:首页-资讯-后端开发
咦!没有更多了?去看看其它编程学习网 内容吧
首页课程
资料下载
问答资讯