如何在 red hat 7 上安装 python3-devel [英] How to install python3-devel on red hat 7

查看:32
本文介绍了如何在 red hat 7 上安装 python3-devel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的虚拟环境中安装一些东西,它使用 anaconda python 3.6.我得到 gcc failed with exit status 1,提示缺少正确的 python3-devel 包,如 错误:安装 eventlet 时命令gcc"失败,退出状态为 1.

为了修复错误,我尝试在运行 RHEL 7.3 的服务器上安装 python3-devel 包.我做了 yum install python3-devel,但得到一个 'package not found' 错误.然后我发现 https://serverfault.com/questions/710354/repository-for-python3-devel-on-centos-7,它暗示了 EPEL 存储库中的 python34-devel 包.我使用 yum 安装了它,但是在尝试在我的虚拟环境中安装某些东西时,我仍然收到 gcc failed with exit status 1 错误.

有人知道我该如何解决这个问题吗?非常感谢所有帮助.

解决方案

在yum中搜索包,使用如下命令:

yum search python3 |开发

它将列出所有可用的开发包.结果会有点像这样

<块引用>

python3-cairo-devel.x86_64:python3-cairo 的库和头文件python3-devel.x86_64:Python 3 所需的库和头文件: 发展python34-devel.x86_64:Python 3 所需的库和头文件: 发展

然后你可以从列表中选择你要安装的包,假设你要安装python3-devel,执行如下

yum install -y python3-devel.x86_64

I am trying to install something in my virtual environment, which uses anaconda python 3.6. I get the gcc failed with exit status 1, hinting on the absence of the right python3-devel package, as described in error: command 'gcc' failed with exit status 1 while installing eventlet.

To fix the error, I tried to install the python3-devel package on my server running RHEL 7.3. I did yum install python3-devel, but got a 'package not found' error. Then I found https://serverfault.com/questions/710354/repository-for-python3-devel-on-centos-7, which hints to the python34-devel package in the EPEL repository. I installed it using yum, but upon trying to install something in my virtual environment, I still get the gcc failed with exit status 1 error.

Does someone know how I can fix this? All help would be much apprechiated.

解决方案

Search for the package in yum , use the following command:

yum search python3 | grep devel

It will list all the available devel packages. The result will be somewhat like this

python3-cairo-devel.x86_64 : Libraries and headers for python3-cairo
python3-devel.x86_64 : Libraries and header files needed for Python 3
                     : development
python34-devel.x86_64 : Libraries and header files needed for Python 3
                      : development

Then you can choose the package you want to install from the list , suppose if you want to to install python3-devel , execute the following

yum install -y python3-devel.x86_64

这篇关于如何在 red hat 7 上安装 python3-devel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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