【发布时间】:2019-11-12 16:45:54
【问题描述】:
我在 RHEL 上。我按照https://www.rosehosting.com/blog/how-to-install-python-3-6-4-on-centos-7/ 安装了python。尝试安装 requests-kerberos 时出现错误
pip3 install requests-kerberos
返回
src/kerberos.c:17:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
sudo yum 安装 gcc
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
Package gcc-4.8.5-39.el7.x86_64 already installed and latest version
Nothing to do
然后我尝试了
sudo yum install python3-devel
得到了
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
No package python3-devel available.
Error: Nothing to do
然后我尝试了
sudo yum install python36-devel
得到了
Error: Package: python36-devel-3.6.8-2.el7.ius.x86_64 (ius)
Requires: python36 = 3.6.8-2.el7.ius
Installed: python3-3.6.8-10.el7.x86_64 (@rhel-7-server-rpms)
python36 = 3.6.8-10.el7
Available: python36-3.6.8-2.el7.ius.x86_64 (ius)
python36 = 3.6.8-2.el7.ius
Error: Package: python36-devel-3.6.8-2.el7.ius.x86_64 (ius)
Requires: python36-libs(x86-64) = 3.6.8-2.el7.ius
Installed: python3-libs-3.6.8-10.el7.x86_64 (@rhel-7-server-rpms)
python36-libs(x86-64) = 3.6.8-10.el7
Available: python36-libs-3.6.8-2.el7.ius.x86_64 (ius)
python36-libs(x86-64) = 3.6.8-2.el7.ius
【问题讨论】:
标签: python-requests python-3.6