在 64 位 Windows 上安装 lxml

2023-12-10

所以我试图在我的机器上安装 lxml,但我似乎无法让它工作。

我有 Windows 8.1 64 位和 python 3.5

我都用过

pip install lxml

and

easy_install lxml

我不断收到此错误消息:

C:\Users\jgarber\Downloads>pip install readability-lxml --upgrade Requirement already up-to-date: readability-lxml in c:\python\lib\site-packages\ readability_lxml-0.6.2-py3.5.egg Requirement already up-to-date: chardet in c:\python\lib\site-packages (from rea dability-lxml) Collecting lxml (from readability-lxml)   Using cached lxml-3.6.4.tar.gz Requirement already up-to-date: cssselect in c:\python\lib\site-packages\csssele ct-1.0.0-py3.5.egg (from readability-lxml) Installing collected packages: lxml   Running setup.py install for lxml ... error
    Complete output from command c:\python\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\jgarber\\AppData\\Local\\Temp\\pip-build-bypbiu8j\ \lxml\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().r eplace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\jgarber\AppD ata\Local\Temp\pip-j8svsde4-record\install-record.txt
--single-version-externall y-managed --compile:
    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\isosc hematron
    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\includ es
    copying src\lxml\includes\htmlparser.pxd -> build\lib.win32-3.5\lxml\include s
    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\include s
    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\include s
    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.win 32-3.5\lxml\isoschematron\resources\xsl
    copying src\lxml\isoschematron\resources\xsl\XSD2Schtrn.xsl -> build\lib.win 32-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_abstra ct_expand.xsl -> build\lib.win32-3.5\lxml\isoschematron\resources\xsl\iso-schema tron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_dsdl_i nclude.xsl -> build\lib.win32-3.5\lxml\isoschematron\resources\xsl\iso-schematro n-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schema tron_message.xsl -> build\lib.win32-3.5\lxml\isoschematron\resources\xsl\iso-sch ematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schema tron_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_f or_xslt1.xsl -> build\lib.win32-3.5\lxml\isoschematron\resources\xsl\iso-schemat ron-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 (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo  /Ox /W3 /GL /DNDEBUG /MD -Isrc\lxml\includes
-Ic:\python\include -Ic:\python\in clude "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\P rogram Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program File s (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\
8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\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 f ile: 'libxml/xmlversion.h': No such file or directory
    Compile failed: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14 .0\\VC\\BIN\\cl.exe' failed with exit status 2
    creating Users
    creating Users\jgarber
    creating Users\jgarber\AppData
    creating Users\jgarber\AppData\Local
    creating Users\jgarber\AppData\Local\Temp
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo  /Ox /W3 /GL /DNDEBUG /MD -I/usr/include/libxml2 "-IC:\Program Files (x86)\Micro soft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\in clude\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shar ed" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files ( x86)\Windows Kits\8.1\include\winrt" /TcC:\Users\jgarber\AppData\Local\Temp\xmlX PathInit_qrahzea.c /FoUsers\jgarber\AppData\Local\Temp\xmlXPathInit_qrahzea.obj
    xmlXPathInit_qrahzea.c
    C:\Users\jgarber\AppData\Local\Temp\xmlXPathInit_qrahzea.c(1): fatal error C 1083: Cannot open include file: 'libxml/xpath.h': No such file or directory
    ****************************************************************************
*****
    Could not find function xmlCheckVersion in library libxml2. Is libxml2 insta lled?
    ****************************************************************************
*****
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\B IN\\cl.exe' failed with exit status 2

    ---------------------------------------- Command "c:\python\python.exe -u -c "import setuptools, tokenize;__file__='C:\\U sers\\jgarber\\AppData\\Local\\Temp\\pip-build-bypbiu8j\\lxml\\setup.py';exec(co mpile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __ file__, 'exec'))" install --record C:\Users\jgarber\AppData\Local\Temp\pip-j8svs de4-record\install-record.txt --single-version-externally-managed
--compile" fai led with error code 1 in C:\Users\jgarber\AppData\Local\Temp\pip-build-bypbiu8j\ lxml\

我也尝试过从下载 .whlhttp://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml并尝试手动安装轮子但收到此错误消息:

C:\Users\jgarber\Downloads>pip install lxml-3.6.4-cp35-cp35m-win_amd64.whl
lxml-3.6.4-cp35-cp35m-win_amd64.whl is not a supported wheel on this platform.

即使与python -m pip install陈述。

此时我不确定我错过了什么,任何帮助将不胜感激。


默认情况下,Python 将在 Windows 上安装为 32 位,即使在 64 位系统上。因此,为了匹配这一点,您必须选择32位系统的轮子。

您可以验证您的Python解释器是否是32位的,因为启动时REPL将如下所示:

Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:01:18) [MSC v.1900 32 bit (Intel)] on win32

你应该选择lxml-3.6.4-cp35-cp35m-win32.whlWindows 上的 Python 3.5 包(除非您在下载 Python 时明确选择 64 位),这应该可以解决您的问题。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

在 64 位 Windows 上安装 lxml 的相关文章

随机推荐

  • WP7 GestureListener 上图像宽度/高度的约束

    我添加了GestureListener对于一个图像 我试图像这样的 Stack Overflow 答案进行缩放 如何在WP7中放大和缩小图像 问题是图像永远不会停止缩放 并覆盖页面上的其他控件 这涵盖了页面上的一些重要按钮 此外 它允许图像
  • 找不到 Graphviz 的可执行文件(Python 3.4)

    我在 Windows 7 上运行 Python3 4 我尝试使用 graphviz 的 Python 接口 这是我打算运行的脚本 from graphviz import Digraph import pydotplus dot Digra
  • 通过命令行替换 csv 中的特定文本

    我有 csv 格式的数据 可以从以下位置获取输出SQL Server 数据有一些NULL and N A 写出的值构成列字符类型 否则它只会由整数组成 是否可以通过批处理文件语句查找这些值并将其替换为数字 例如 1NULL和 2 为N A
  • PYSPARK:如何可视化 GraphFrame?

    假设我创建了下图 我的问题是如何可视化它 Create a Vertex DataFrame with unique ID column id v sqlContext createDataFrame a Alice 34 b Bob 36
  • 如何使用 openssl lib pem_read 从字符串读取公钥/私钥

    我在C 中使用openssl 将PrivateKey和PublicKey文件内容复制到两个const char 但我看到api的演示只是从pem文件中获取pem公钥 私钥 那么如何从字符串中获取公钥 私钥呢 尝试这个 char mKey B
  • 缩放 UIPageControl 的当前点并保持其居中

    我对 UIPageControl 进行了子类化 以便使其当前的点更大 class CustomPageControl UIPageControl override var currentPage Int didSet updateDots
  • 在 Python 中将数据文件列拆分为单独的数组

    我是 python 新手 一整天都在试图解决这个问题 我有一个数据文件 如下所示 time I R stkb Step Information Temp 0 Run 1 11 0 000000000000000e 000 0 000000e
  • 在 PHPMailer 上使用 OAuth 2.0 的 Microsoft Office 授权问题

    我在通过 PHPMail 发送 SMTP 邮件期间遇到 OAuth 2 0 授权问题 基本上 我已经尝试了下面列出的所有范围 email openid profile https graph microsoft com Mail Send
  • 用 div 替换文本框,jquery 不起作用

    它只工作了几秒钟 然后 div 再次消失 document ready function done click function txtname replaceWith function return div this val div 你也
  • 如何使用太阳黑子实现通配符搜索

    随时欢迎任何帮助 我将 sunspot 与 solr 一起使用 但无法找到任何好的解决方案来说明如何使用 sunspot 执行通配符搜索 如果我搜索 8088 它应该返回以 8088 但不是 228088560 开头的所有数字 在 solr
  • 从 libgdx 中的集合中检测触摸对象(移动)的最佳方法

    这是我第一次尝试游戏开发 我刚刚开始尝试 libgdx 并了解游戏编程的不同方面 我看了示例项目 我可以了解libgdx游戏的整体架构 但为了掌握游戏动力学的基础知识 我开始玩低级的东西 比如如何绘制简单的形状 如何移动它们 如何处理此类碰
  • 从 C# 应用程序中启动 SFC

    我一直在寻找 但似乎无法完成这项工作 我正在尝试从 C 应用程序中的按钮启动 SFC 我知道这需要权利提升 并且在我试图做的范围内是我想要的行为 我努力了 以管理员身份运行 cmd 和命令 使用来自 C 的参数以管理员身份运行 CMD an
  • 如何在 firebase 中实现基于角色的访问控制

    这是我第一次涉足 Firebase 和 nosql 我有 SQL 背景 使用简单登录安全电子邮件 密码 如何限制对 Firebase 中数据的访问 例如 某些用户有权创建业务对象 用户 客户 类别等 而其他用户则无权 有没有办法将权限列表附
  • 具有动态行和列的 angular2 表

    如何在 angular2 中创建具有动态列和行的表格 我的数据来自休息服务并在此可观察中捕获 this physicalDataService getPhysicalData subscribe res gt this data res 我
  • 使用查询字符串和锚点标签形成正确的 URL

    当查询字符串和锚标记 哈希标记 在 URL 中可见时 它们的正确显示顺序是什么 http www whatever com var val anchor or http www whatever com anchor var val 有这方
  • 组合 ASP.NET 属性中的字符串

    我正在尝试在属性内连接一个字符串 我收到一个错误 我认为这与我的Eval 是否有正确的方法来连接字符串 或者这是不可能的 我认为问题在于我设置 NavigateUrl 的位置
  • 循环优化。寄存器重命名如何打破依赖关系?什么是执行端口容量?

    我正在分析 Agner Fog 的 optimization assemble 中的循环示例 我指的是12 9章 代码是 我简化了一下 L1 vmulpd ymm1 ymm2 rsi rax vaddpd ymm1 ymm1 rdi rax
  • 使用 BouncyCastle SSL 通过 keyFile 进行 Java AES 解密

    我正在尝试编写 Java 代码 使用与 OpenSSL 解密兼容的 BouncyCastle 来解密使用 AES256 加密的文件 s key 是提供的文件 其中包含将用于加密和解密的密钥 需要完成的步骤 1 读取密钥文件 2 使用提供的密
  • WebView 阻止弹出窗口吗?

    我在用着WebView浏览 pesopay com 并且它工作正常 除了当我按下提交按钮时 使用 Google Chrome 等互联网浏览器会显示一个弹出窗口 确认您填写的信息 但在我的安卓里WebView当我按下提交按钮时什么也没发生 我
  • 在 64 位 Windows 上安装 lxml

    所以我试图在我的机器上安装 lxml 但我似乎无法让它工作 我有 Windows 8 1 64 位和 python 3 5 我都用过 pip install lxml and easy install lxml 我不断收到此错误消息 C U