Installing Numpy on Fedora 19 with pip

2019-07-07 11:35发布

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.

2条回答
冷血范
2楼-- · 2019-07-07 12:29
sudo yum install python-devel

And then it shall work flawlessly.

查看更多
放荡不羁爱自由
3楼-- · 2019-07-07 12:31

The development version of python needs to be installed:

yum install python-devel
查看更多
登录 后发表回答