用点子在Fedora 19上安装Numpy

问题描述 投票:3回答:2

我尝试使用Numpy在Fedora 19上安装Python 2.7 pip模块:

sudo pip install numpy

但是我有以下错误:

"Cannot compile 'Python.h'. Perhaps you need to "\

SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.

----------------------------------------
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-root/numpy
Storing complete log in /root/.pip/pip.log

我该如何解决?

谢谢。

python numpy pip fedora
2个回答
4
投票
sudo yum install python-devel

然后它将可以正常工作。


3
投票

需要安装python的开发版本:

yum install python-devel
© www.soinside.com 2019 - 2024. All rights reserved.