简体   繁体   English

为什么在尝试安装pyquery python模块时收到此错误?

[英]Why am I receiving this error when trying to install pyquery python module?

I'm using the following command 我正在使用以下命令

!pip install pyquery

I'm able to install other modules. 我可以安装其他模块。 Does anyone know why this is happening? 有人知道为什么会这样吗? Thanks! 谢谢!


src/lxml/includes/etree_defs.h:14:10: fatal error: 'libxml/xmlversion.h' file not found
#include "libxml/xmlversion.h"
         ^
1 error generated.
Compile failed: command 'cc' failed with exit status 1
creating var
creating var/folders
creating var/folders/p1
creating var/folders/p1/xg17tts541n1__p_srg1n2j80000gn
creating var/folders/p1/xg17tts541n1__p_srg1n2j80000gn/T
cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c /var/folders/p1/xg17tts541n1__p_srg1n2j80000gn/T/xmlXPathInit9XZ4sL.c -o var/folders/p1/xg17tts541n1__p_srg1n2j80000gn/T/xmlXPathInit9XZ4sL.o
/var/folders/p1/xg17tts541n1__p_srg1n2j80000gn/T/xmlXPathInit9XZ4sL.c:1:10: fatal error: 'libxml/xpath.h' file not found
#include "libxml/xpath.h"
         ^
1 error generated.
*********************************************************************************
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
Perhaps try: xcode-select --install
*********************************************************************************
error: command 'cc' failed with exit status 1

----------------------------------------

Command "/usr/bin/python -c "import setuptools, tokenize; 命令“ / usr / bin / python -c”导入setuptools,标记化; file ='/private/var/folders/p1/xg17tts541n1__p_srg1n2j80000gn/T/pip-build-nn9QXj/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)( file ).read().replace('\\r\\n', '\\n'), file , 'exec'))" install --record /var/folders/p1/xg17tts541n1__p_srg1n2j80000gn/T/pip-X97yGE-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/p1/xg17tts541n1__p_srg1n2j80000gn/T/pip-build-nn9QXj/lxml 文件 ='/ private / var / folders / p1 / xg17tts541n1__p_srg1n2j80000gn / T / pip-build-nn9QXj / lxml / setup.py'; exec(compile(getattr(tokenize,'open',open)( file ).read() .replace('\\ r \\ n','\\ n'), file ,'exec'))“安装--record /var/folders/p1/xg17tts541n1__p_srg1n2j80000gn/T/pip-X97yGE-record/install-record.txt --single-version-externally-managed --compile“在/ private / var / folders / p1 / xg17tts541n1__p_srg1n2j80000gn / T / pip-build-nn9QXj / lxml中失败,错误代码为1

Based on this reference http://forums.fedoraforum.org/showthread.php?t=297730 , 根据此参考http://forums.fedoraforum.org/showthread.php?t=297730

I was tried installing libffi-devel, libxml2-devel, libxslt-devel and it solved the issue. 我尝试安装libffi-devel,libxml2-devel,libxslt-devel,它解决了这个问题。 I'm using CentOS 7. 我正在使用CentOS 7。

src/lxml/includes/etree_defs.h:14:10: fatal error: 'libxml/xmlversion.h' file not found src / lxml / includes / etree_defs.h:14:10:致命错误:找不到“ libxml / xmlversion.h”文件

include "libxml/xmlversion.h" 包括“ libxml / xmlversion.h”

I had encountred this type of errors. 我遇到过这种类型的错误。 In most cases installing development package of shared libraries the module requires fix it. 在大多数情况下,安装共享库开发包时,模块需要对其进行修复。

In Debian libxml2-dev has all the header files of libxml2 pacakge. 在Debian中,libxml2-dev具有libxml2 pacakge的所有头文件。 libxml2:amd64/jessie 2.9.1+dfsg1-5 uptodate libxml2-dev:amd64/jessie 2.9.1+dfsg1-5 uptodate libxml2:amd64 / jessie 2.9.1 + dfsg1-5最新libxml2-dev:amd64 / jessie 2.9.1 + dfsg1-5最新

lxml module requires libxml2-dev and libxslt1-dev. lxml模块需要libxml2-dev和libxslt1-dev。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么我在尝试使用 sshtunnel 连接到 MYSQL DB 时收到此错误 - 没有名为 STRINGIO 的模块 - Why am I receiving this error-no module named STRINGIO when trying to connect to MYSQL DB using sshtunnel 为什么在尝试比较两个列表时出现错误? - Why am I receiving an error when trying to compare two lists? 为什么我收到错误错误:当我使用 Pandas 时,模块 'string' 没有属性 'lower'? - Why I am receiving the error Error: module ‘string’ has no attribute ‘lower’ when I am using Pandas? 我正在尝试安装python模块HTTP - I am trying to install python module HTTP 为什么我收到 Python 的类型错误? - Why am I receiving a type error for Python? 为什么我在导入模块时收到 Pylance 错误,就好像模块没有被识别一样? - Why am I receiving a Pylance Error when Importing a Module, almost as if the Module is not being recognized? 为什么在尝试将应用程序推送到 IBM 云时会收到错误消息? - Why am I receiving an error when trying to push application to IBM cloud? 有谁知道为什么我在尝试将列表转换为字典时会收到此错误? - Does anyone know why I am receiving this error when trying to convert a list to a dictionary? 为什么我在尝试使用 tkinter 制作多个 windows gui 时收到错误消息? - Why am I receiving a error when trying to use tkinter to make multiple windows gui? 为什么我在尝试使用 tkinter 制作多个 windows 时收到错误消息? - Why am I receiving a error when trying to use tkinter to make multiple windows?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM