3

我尝试使用以下命令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

我该如何解决?

谢谢。

4

2 回答 2

4
sudo yum install python-devel

然后它将完美地工作。

于 2013-09-27T12:13:36.993 回答
3

需要安装python的开发版:

yum install python-devel
于 2013-09-27T12:12:27.303 回答