无法在virtualenv中安装libxml2 [英] cannot Install libxml2 in virtualenv

查看:117
本文介绍了无法在virtualenv中安装libxml2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

libxml2 python模块出现问题.

I have got an issue with libxml2 python module.

我正在尝试使用以下命令将其安装在 python3 virtualenv 上:

I'm trying to install it on a python3 virtualenv using the following command:

pip install libxml2-python3

但它显示以下错误:

Collecting libxml2-python3   Using cached
https://files.pythonhosted.org/packages/41/97/a2ecf6c5b291799dbd40b3d041d89b0ecdb1b43c8c2503e27991325851cd/libxml2-python3-2.9.5.tar.gz
     Complete output from command python setup.py egg_info:
     failed to find headers for libxml2: update includes_dir

     ---------------------------------------- 
 Command "python setup.py egg_info" failed with error code 1 in
 /tmp/pip-install-72u9ke0y/libxml2-python3/

我尝试了以下链接中提供的解决方案,但对我没有任何帮助:

I tried the solutions provided in the following links but nothing works for me :

https://github.com/GoogleCloudPlatform/google-cloud-python /issues/3884

"pip安装展开":"python setup.py egg_info"失败,错误代码为1

如何在virtualenv中安装libxml2?

我在fedora 27 OS上工作

i work on fedora 27 os

推荐答案

如果我没记错的话,您将需要libxml2开发文件. 尝试运行

If I'm not mistaken, you would need the libxml2 development files. Try running

yum install libxml2-devel

然后再次运行pip安装

then run the pip install again

这篇关于无法在virtualenv中安装libxml2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆