Installing Numpy on Fedora 19 with pip

2019-07-07 11:49发布

问题:

I tried to install Python 2.7 Numpy module on Fedora 19 using pip:

sudo pip install numpy

But I have the following error:

"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

How can I fix that?

Thanks.

回答1:

sudo yum install python-devel

And then it shall work flawlessly.



回答2:

The development version of python needs to be installed:

yum install python-devel