天天看點

python numpy安裝失敗_安裝python numpy

$sudo pip install -U numpy

...

File "numpy/core/setup.py", line 410, in generate_config_h

moredefs, ignored = cocache.check_types(config_cmd, ext, build_dir)

File "numpy/core/setup.py", line 41, in check_types

out

=

check_types(*a,

**kw)

File "numpy/core/setup.py", line 271, in check_types

"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

解決方法:

可以通過

gui

安裝:

system>administration>add/remove software>search numpy and install it.

也可以試試用

sudo yum install numpy

安裝。

yum search

yum search numpy

Loaded plugins: fastestmirror, refresh-packagekit, security

Loading mirror speeds from cached hostfile

* base: mirrors.btte.net

* extras: mirrors.btte.net

* updates: mirrors.btte.net

============================== N/S Matched: numpy ==============================

numpy-f2py.x86_64 : f2py for numpy

numpy.x86_64 : A fast multidimensional array facility for Python

Name and summary matches only, use "search all" for everything.