首页 文章

使用pip和python 2.7在Windows 7上安装lxml

提问于
浏览
22

当我尝试在我的Windows 7机器上使用pip升级lxml时,我得到下面打印的日志 .

当我卸载并尝试从头开始安装时,我得到了同样的错误 . 有任何想法吗?

从https://pypi.python.org/packages/source/l/lxml/l xml-3.2.4.tar.gz下载/解包lxml#md5 = cc363499060f615aca1ec8dcc04df331正在下载lxml-3.2.4.tar.gz(3.3 MB):3.3MB下载运行setup.py egg_info for package lxml Building lxml version 3.2.4 . 没有Cython的建筑 . 错误:Nazwa'xslt-config'nie jest rozpoznawana jakopoleceniewewnętrznelubzewnętrzne,program wykonywalny lub plik wsadowy . *确保安装了libxml2和libxslt的开发包
*使用libxslt的构建配置
D:\ software \ Python27 \ lib \ distutils \ dist.py:267:UserWarning:未知的分发选项:'bugtrack_url'
warnings.warn(MSG)

警告:在目录'src \ lxml'下找不到匹配'lxml.etree.c'的文件
警告:在目录'src \ lxm l'下找不到匹配'lxml.objectify.c'的文件
警告:在目录'src \ lxml'下找不到匹配'lxml.etree.h'的文件
警告:在目录'src \ lxm l'下找不到匹配'lxml.etree_api.h'的文件
警告:在目录'src \ lxml'下找不到匹配'etree_defs.h'的文件
警告:在目录'src \ lxml \ tests'下找不到匹配'* .txt'的文件
警告:找不到与'doc'目录下的'pubkey.asc'匹配的文件
警告:找不到与'doc'目录下的'tagpython * .png'匹配的文件
警告:找不到与'doc'目录下的'Makefile'匹配的文件安装收集的包:lxml找到现有安装:
lxml 2.3卸载lxml:成功卸载lxml运行setup.py install for lxml Building lxml version 3.2.4 . 没有Cython的建筑 . 错误:Nazwa'xslt-config'nie jest rozpoznawana jakopoleceniewewnętrznelubzewnętrzne,program wykonywalny lub plik wsadowy . *确保安装了libxml2和libxslt的开发包
*使用libxslt的构建配置
Build 'lxml.etree'扩展
D:\ software \ Microsoft Visual Studio 9.0 \ VC \ BIN \ cl.exe / c / nologo / Ox / MD / W3 / GS- / DNDEBUG
-Ic:\ users \ x \ appdata \ local \ temp \ pip_build_x \ lxml \ src \ lxml \ inc ludes -ID:\ software \ Python27 \ include -ID:\ software \ Python27 \ PC / Tcsrc \ lxml \ lxml . etree.c /Fobuild\temp.win32-2.7\Release\src\lxml\lxml.etree.obj lxml.etree.cc:\ users \ x \ appdata \ local \ temp \ pip_build_x \ lxml \ src \ lxml \ includes \ etree_d efs.h(9):致命错误C1083:无法打开包含文件:'libxml / xmlversion.h':N o这样的文件或目录D:\ software \ Python27 \ lib \ distutils \ dist.py:267:UserWarning:未知的分发选项:'bugtrack_url'warnings.warn(msg)错误:命令'“D:\ software \ Microsoft Visual Studio 9.0 \ VC \ BIN \ cl.exe”'fai以退出状态2结束从命令D完成输出: \ software \ Python27 \ python.exe -c“import setu ptools; file ='c:\ users \ x \ appdata \ local \ temp \ pip_build_x \ lxml \ setu p.py'; exec(compile(open(file) . read() . replace('\ r \ n','\ n'),file,'exec'))“install --record c:\ users \ x \ appdata \ local \ temp \ pip-pyyuss-record \ install-r ecord.txt --single-version-external-managed:构建lxml版本3.2.4 . 没有Cython的建筑 . 错误:Nazwa'xslt-config'nie jest rozpoznawana jakopoleceniewewnętrznelubzewnętrzne,program wykonywalny lub plik wsadowy . 确保安装了libxml2和libxslt的开发包使用libxslt的构建配置运行安装运行构建运行build_py创建构建创建build \ lib.win32-2.7创建build \ lib.win32-2.7 \ lxml复制src \ lxml \ builder.py - > build \ lib.win32-2.7 \ lxml复制src \ lxml \ cssselect.py - > build \ lib.win32-2.7 \ lxml复制src \ lxml \ doctestcompare.py - > build \ lib.win32- 2.7 \ lxml复制src \ lxml \ ElementInclude.py - > build \ lib.win32-2.7 \ lxml复制src \ lxml \ pyclasslookup.py - > build \ lib.win32-2.7 \ lxml复制src \ lxml \ sax.py - > build \ lib.win32-2.7 \ lxml复制src \ lxml \ usedoctest.py - > build \ lib.win32-2.7 \ lxml复制src \ lxml_elementpath.py - > build \ lib.win32-2.7 \ lxml复制src \ lxml__init__ .py - > build \ lib.win32-2.7 \ lxml创建build \ lib.win32-2.7 \ lxml \包含复制src \ lxml \ includes__init __ . py - > build \ lib.win32-2.7 \ lxml \ includes包含创建build \ lib .win32-2.7 \ lxml \ html复制src \ lxml \ html \ builder.py - > build \ lib.win32-2.7 \ lxml \ html复制s rc \ lxml \ html \ clean.py - > build \ lib.win32-2.7 \ lxml \ html复制src \ lxml \ html \ defs.py - > build \ lib.win32-2.7 \ lxml \ html复制src \ lxml \ html \ diff.py - > build \ lib.win32-2.7 \ lxml \ html复制src \ lxml \ html \ ElementSoup.py - > build \ lib.win32-2.7 \ lxml \ html复制src \ lxml \ html \ formfill.py - > build \ lib.win32-2.7 \ lxml \ html复制src \ lxml \ html \ html5parser.py - > build \ lib.win32-2.7 \ lxml \ html复制src \ lxml \ html \ soupparser.py - > build \ lib.win32-2.7 \ lxml \ html复制src \ lxml \ html \ usedoctest . py - > build \ lib.win32-2.7 \ lxml \ html复制src \ lxml \ html_diffcommand.py - > build \ lib.win32-2.7 \ lxml \ html复制src \ lxml \ html_html5builder.py - > build \ lib.win32 -2.7 \ lxml \ html复制src \ lxml \ html_setmixin.py - > build \ lib.win32-2.7 \ lxml \ html复制src \ lxml \ html__init __ . py - > build \ lib.win32-2.7 \ lxml \ html创建构建\ lib.win32-2.7 \ lxml \ isoschematron复制src \ lxml \ isoschematron__init __ . py - > build \ lib.win32-2.7 \ lxml \ isoschema tron复制src \ lxml \ lxml.etree.h - > build \ lib.win32- 2.7 \ lxml复制src \ lxml \ lxml.etree_api.h - > build \ lib.win32-2.7 \ lxml复制src \ lxml \ includes \ c14n.pxd - > build \ lib.win32-2.7 \ lxml \包含复制src \ lxml \ includes \ config.pxd - > build \ lib.win32-2.7 \ lxml \包括复制src \ lxml \ includes \ dtdvalid.pxd - > build \ lib.win32-2.7 \ lxml \ includes复制src \ lxml \ includes \ etreepublic.pxd - > build \ lib.win32-2.7 \ lxml \ includes复制src \ lxml \ includes \ htmlparser.pxd - > build \ lib.win32-2.7 \ lxml \包含复制src \ lxml \ includes \ relaxng.pxd - > build \ lib.win32-2.7 \ lxml \ includes复制src \ lxml \ includes \ schematron.pxd - > build \ lib.win32-2.7 \ lxml \包含复制src \ lxml \ includes \ tree.pxd - > build \ lib.win32-2.7 \ lxml \ includes复制src \ lxml \ includes \ uri.pxd - > build \ lib.win32-2.7 \ lxml \包含复制src \ lxml \ includes \ xinclude.pxd - > build \ lib.win32-2.7 \ lxml \包含复制src \ lxml \ includes \ xmlerror.pxd - > build \ lib.win32-2.7 \ lxml \包括复制src \ lxml \ includes \ xmlparser.pxd - > build \ lib.win32-2.7 \ lxml \包含复制src \ lxml \ includes \ xmlschema.pxd - > build \ lib.win32- 2.7 \ lxml \包括复制src \ lxml \ includes \ xpath.pxd - > build \ lib.win32-2.7 \ lxml \包含复制src \ lxml \ includes \ xslt.pxd - > build \ lib.win32-2.7 \ lxml \包括复制sr c \ lxml \ includes \ etree_defs.h - > build \ lib.win32-2.7 \ lxml \包括复制src \ lxml \ includes \ lxml-version.h - > build \ lib.win32-2.7 \ lxml \ includes包含创建构建\ lib.win32-2.7 \ lxml \ isoschematron \ resources创建build \ lib.win32-2.7 \ lxml \ isoschematron \ resources \ rng复制src \ lxml \ isoschematron \ resources \ rng \ iso-schematron.rng - > build \ lib.win 32-2.7 \ lxml \ isoschematron \ resources \ rng创建build \ lib.win32-2.7 \ lxml \ isoschematron \ resources \ xsl复制src \ lxml \ isoschematron \ resources \ xsl \ RNG2Schtrn.xsl - > build \ lib.win32-2 .7 \ lxml \ isoschematron \ resources \ xsl复制src \ lxml \ isoschematron \ resources \ xsl \ XSD2Schtrn.xsl - > build \ lib.win32-2 .7 \ lxml \ isoschematron \ resources \ xsl created build \ lib.win32- 2.7 \ lxml \ isoschematron \ resources \ xsl \ iso-schematron-xsl t1复制src \ lxml \ isoschematron \ resources \ xsl \ iso-schematron-xslt1 \ iso_abstract_e xpand.xsl - > build \ lib.win32-2.7 \ lxml \ isoschematron \ resources \ xsl \ iso-schematron -xslt1复制src \ lxml \ isoschematron \ resources \ xsl \ iso-schematron-xslt1 \ iso_dsdl_inclu de.xsl - > build \ lib.win32-2.7 \ lxml \ isoschematron \ resources \ xsl \ iso-schematron-xs lt1复制src \ lxml \ isoschematron \ resources \ xsl \ iso-schematron-xslt1 \ iso_schematron _message.xsl - > build \ lib.win32-2.7 \ lxml \ isoschematron \ resources \ xsl \ iso-schemat ron-xslt1复制src \ lxml \ isoschematron \ resources \ xsl \ iso-schematron-xslt1 \ iso_schematron skeleton_for_xslt1.xsl - > build \ lib . win32-2.7 \ lxml \ isoschematron \ resources \ xsl \ iso-schematron-xslt1复制src \ lxml \ isoschematron \ resources \ xsl \ iso-schematron-xslt1 \ iso_svrl_for_x slt1.xsl - > build \ lib.win32-2.7 \ lxml \ isoschematron \ resources \ xsl \ iso-schematron- xslt1复制src \ lxml \ isoschematron \ resources \ xsl \ iso-schematron-xslt1 \ readme.txt - > build \ lib.win32-2.7 \ lxml \ isoschematron \ resources \ xsl \ iso -schematron-xslt1运行build_ext构建'lxml.etree'扩展创建build \ temp.win32-2.7创建build \ temp.win32-2.7 \发布创建build \ temp.win32-2.7 \ Release \ src创建build \ temp.win32- 2.7 \ Release \ src \ lxml D:\ software \ Micr osoft Visual Studio 9.0 \ VC \ BIN \ cl.exe / c / nologo / Ox / MD / W3 / GS - / DNDEBUG -Ic:\ users \ x \ appdata \ local \ temp \ pip_build_x \ lxml \ src \ lxml \ include s -ID:\ software \ Python27 \ include -ID:\ software \ Python27 \ PC /Tcsrc \ lxml \ lxml.etre ec /Fobuild\temp.win32-2.7\Release\src\lxml\lxml.etree.obj lxml . etree.cc:\users\x\appdata\local\temp\pip_build_x\lxml\src\lxml\includes\etree_defs . h(9):致命错误C1083:无法打开包含文件:'libxml / xmlversion.h':没有文件或目录D:\ software \ Python27 \ lib \ distutils \ dist.py:267:UserWarning:未知的分发选项:'bugtrack_url'warnings.warn(msg)错误:命令'“D:\ software \ Microsoft Visual Studio 9.0 \ VC \ BIN \ cl.exe“'以退出状态2失败-------------------------------------- - 回滚卸载lxml清理...命令D:\ software \ Python27 \ python.exe -c“import setuptools; file ='c:\ user s \ x \ appdata \ local \ temp \ pip_build_x \ lxml \ setup.py'; exec(compile(open( file _) . read() . replace('\ r \ n','\ n'),file,'exec'))“install --record c:\ u sers \ x \ appdata \ local \ temp \ pip-pyyuss-record \ install-record.txt --s--versio n-external-managed失败,错误代码1在c:\ users \ x \ appdata \ local \ temp \ pip_build_x \ lxml Traceback(最近一次调用最后一次):文件“D:\ software \ Python27 \ Scripts \ pip-script.py”,第9行,在load_entry_point中('pip == 1.4.1','console_scripts','pip ')()文件“D:\ software \ Python27 \ lib \ site-packages \ pip__init __ . py”,第148行,在ma中返回command.main(args [1:],options)文件“D:\ softwar e \ Python27 \ lib \ site-packages \ pip \ basecommand.py“,第169行,主文本='\ n'.join(complete_log)UnicodeDecodeError:'ascii'编解码器无法解码位置72的字节0xa9:序数不在范围内(128)

8 回答

  • 8

    如果您安装了编译器(使用VS C 2008 Express测试),则只需运行:

    set STATICBUILD=true && pip install lxml

    正如on documentation所指出的,设置 STATICBUILD 将告诉lxml的安装程序在构建之前自动下载其所有二进制依赖项 .

    这些 lxml 二进制依赖项(从源代码安装时应该存在)将由安装程序下载并一起构建:

    • libxslt

    • iconv

    • zlib

    • libxml2

    Bonus :它也适用于virtualenv .

  • 16

    这个问题较旧但仍会在谷歌中弹出 . 我尝试了这个问题的其他答案,但由于某种原因它们无法正常工作,我不想跟踪并安装所有依赖项以在Windows上编译 .

    我注意到在pypi上,一些lxml版本提供了windows轮子而其他版本没有 .

    所以对我来说最简单的解决方案是指定一个版本......即 pip install lxml==3.6.0 ,因为3.6.0提供了一个轮子,而较新的3.6.4没有

  • 24

    对于您的问题,有一个单行解决方案 . 不知何故,这是工作意味着你假设你正在低水平刮,然后这将工作 .

    经过8个小时的研究,我发现这没什么用

    pip install lxml==3.6.0
    

    不需要其他任何东西 .

    以上所有内容均适用于Windows .

    评论是否有其他类型的问题持续乐意提供帮助 .

    这是我8小时后的成功:
    Here is my success after 8 hours

  • 3

    您可以执行Flak's answer中的步骤,或者只需download the Windows installer,双击即可启动它,然后继续前进 .

  • 2

    These instructions are for Windows7 or Windows8 with Python2.7 .

    However ,它们应该适用于各种版本,因为python和其他各自的先决条件的发布会改变/发展:

    • 安装 Python2.7

    • 从下载页面下载最新版本的Python2.7(目前为2.7.6)HERE

    • Win32 MSI安装程序的直接链接 - > HERE

    • Win64 MSI安装程序的直接链接 - > HERE

    • 只需运行MSI即可安装python . 它将在注册表中注册,并显示在“添加/删除程序”中 .

    • NOTE: 以下说明假设您在Python安装向导中询问时选择将python安装到 C:\python27\ 的默认路径

    • C:\python27\C:\python27\scripts 文件夹添加到系统路径,方法是将这些目录添加到 Control Panel > System > Advanced System Settings link (Advanced Tab) > Environmental Variables (Button)PATH 环境变量中 .

    • (可选)安装 OpenSSL

    • HERE下载 Win32 OpenSSL page ,以获取适用于您的Windows和PC架构的版本

    • 下载 Visual C++ 2008 redistributables 为您的Windows和PC架构版本

    • 下载 OpenSSL 为您的Windows和体系结构版本(常规版本,而不是轻量级版本)

    • 将以下(取决于您的体系结构)目录(或您安装到的任何地方)添加到 PATH ,与上面添加 C:\python27C:\python27\scripts 的方式相同:

    • 32-bit: c:\openssl-win32\bin

    • 64-bit: c:\openssl-win64\bin

    • 安装 Setuptoolsget-pip.py 应该为你安装Setuptools),但是,为了以防万一...

    • 下载 ez_setup.py HERE并将其保存在 C:\python27\scripts

    • 运行 C:\python27\scripts> python ez_setup.py

    • 安装 PIP

    • HERE下载 get-pip.py 并将其保存在 C:\python27\scripts

    • 运行 C:\python27\scripts> python get-pip.py

    • 安装 LXML

    • HERE下载 LXML 3.3.3 ,以获取适用于您的Windows和PC架构的版本

    • 运行EXE文件

  • 41

    lxml网站上的常见问题解答指向一个为Windows创建二进制发行版的网站:

    http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml

    可以使用pip安装车轮 .

    https://pip.pypa.io/en/latest/user_guide/#installing-from-wheels

    pip install lxml‑3.5.0‑cp27‑none‑win32.whl
    
  • 4

    您需要在虚拟环境中安装libxml,libxslt,libiconv和zlib . 你还需要VS 2008,因为python 2.7是针对该版本编译的 . 我在这里写了一个更详细的解释http://www.laurivan.com/install-lxml-on-windows-on-a-virtualenv/

  • 1

    我已经安装了(VS C 2014 Express)直接pip安装失败但添加了以下借用 Fernando Macedo set STATICBUILD = true && pip install lxml这对我来说在windows 10上使用Python 3.5.2,lxml 3.6.4在virtualenv中工作了

    -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 **
    
           Using build configuration of libxslt
           running bdist_wheel
           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
      creating build\temp.win32-3.5
      creating build\temp.win32-3.5\Release
      creating build\temp.win32-3.5\Release\src
      creating build\temp.win32-3.5\Release\src\lxml
      C:\Program Files\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Isrc\lxml\includes "-Ic:\program files\python35-32\include" "-Ic:\program files\python35-32\include" "-IC:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files\Windows Kits\10\include\10.0.14393.0\ucrt" "-IC:\Program Files\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files\Windows Kits\10\include\10.0.14393.0\shared" "-IC:\Program Files\Windows Kits\10\include\10.0.14393.0\um" "-IC:\Program Files\Windows Kits\10\include\10.0.14393.0\winrt" /Tcsrc\lxml\lxml.etree.c /Fobuild\temp.win32-3.5\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:\\Program Files\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2
      creating Users
      creating Users\DDSHARMA
      creating Users\DDSHARMA\AppData
      creating Users\DDSHARMA\AppData\Local
      creating Users\DDSHARMA\AppData\Local\Temp
      C:\Program Files\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I/usr/include/libxml2 "-IC:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files\Windows Kits\10\include\10.0.14393.0\ucrt" "-IC:\Program Files\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files\Windows Kits\10\include\10.0.14393.0\shared" "-IC:\Program Files\Windows Kits\10\include\10.0.14393.0\um" "-IC:\Program Files\Windows Kits\10\include\10.0.14393.0\winrt" /TcC:\Users\DDSHARMA\AppData\Local\Temp\xmlXPathInitsaig9hq_.c /FoUsers\DDSHARMA\AppData\Local\Temp\xmlXPathInitsaig9hq_.obj
      xmlXPathInitsaig9hq_.c
      C:\Users\DDSHARMA\AppData\Local\Temp\xmlXPathInitsaig9hq_.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\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2
    
      ----------------------------------------
      Failed building wheel for lxml
      Running setup.py clean for lxml
    Failed to build lxml
    Installing collected packages: lxml
      Running setup.py install for lxml ... error
        Complete output from command c:\users\ddsharma\documents\pymote_env\scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\DDSHARMA\\AppData\\Local\\Temp\\pip-build-gtry8727\\lxml\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\DDSHARMA\AppData\Local\Temp\pip-waqsvkju-record\install-record.txt --single-version-externally-managed --compile --install-headers c:\users\ddsharma\documents\pymote_env\include\site\python3.5\lxml:
        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 **
    
        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
        creating build\temp.win32-3.5
        creating build\temp.win32-3.5\Release
        creating build\temp.win32-3.5\Release\src
        creating build\temp.win32-3.5\Release\src\lxml
        C:\Program Files\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Isrc\lxml\includes "-Ic:\program files\python35-32\include" "-Ic:\program files\python35-32\include" "-IC:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files\Windows Kits\10\include\10.0.14393.0\ucrt" "-IC:\Program Files\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files\Windows Kits\10\include\10.0.14393.0\shared" "-IC:\Program Files\Windows Kits\10\include\10.0.14393.0\um" "-IC:\Program Files\Windows Kits\10\include\10.0.14393.0\winrt" /Tcsrc\lxml\lxml.etree.c /Fobuild\temp.win32-3.5\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:\\Program Files\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2
        C:\Program Files\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I/usr/include/libxml2 "-IC:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files\Windows Kits\10\include\10.0.14393.0\ucrt" "-IC:\Program Files\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files\Windows Kits\10\include\10.0.14393.0\shared" "-IC:\Program Files\Windows Kits\10\include\10.0.14393.0\um" "-IC:\Program Files\Windows Kits\10\include\10.0.14393.0\winrt" /TcC:\Users\DDSHARMA\AppData\Local\Temp\xmlXPathInit1y_w6myc.c /FoUsers\DDSHARMA\AppData\Local\Temp\xmlXPathInit1y_w6myc.obj
        xmlXPathInit1y_w6myc.c
        C:\Users\DDSHARMA\AppData\Local\Temp\xmlXPathInit1y_w6myc.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\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2
    
        ----------------------------------------
    Command "c:\users\ddsharma\documents\pymote_env\scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\DDSHARMA\\AppData\\Local\\Temp\\pip-build-gtry8727\\lxml\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\DDSHARMA\AppData\Local\Temp\pip-waqsvkju-record\install-record.txt --single-version-externally-managed --compile --install-headers c:\users\ddsharma\documents\pymote_env\include\site\python3.5\lxml" failed with error code 1 in C:\Users\DDSHARMA\AppData\Local\Temp\pip-build-gtry8727\lxml\
    
    (pymote_env) C:\Users\DDSHARMA\Documents\pymote_env>set STATICBUILD=true && 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 ... done
      Stored in directory: C:\Users\DDSHARMA\AppData\Local\pip\Cache\wheels\c6\ad\ad\cd812eeb1e0e179b58d92b1e8bad7accd136f51b5d812fd495
    Successfully built lxml
    Installing collected packages: lxml
    Successfully installed lxml-3.6.4
    
    (pymote_env) C:\Users
    

    \ DDSHARMA \文件\ pymote_env>

相关问题