用pip在Fedora 19上安装Numpy

时间:2013-09-27 12:07:05

标签: python numpy pip fedora

我尝试使用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

我该如何解决?

感谢。

2 个答案:

答案 0 :(得分:4)

sudo yum install python-devel

然后它将完美无缺地工作。

答案 1 :(得分:3)

需要安装python的开发版本:

yum install python-devel