Python3.4和2.7:无法为Python3.4安装numpy包

2024-05-22 17:06:08 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在使用Ubuntu12.04,希望与Python2.7一起使用Python3.4。

python 3.4的安装工作正常。但是,我不能为python 3安装numpy包(因此我不能安装scipy、pandas等)。

使用

 sudo pip3 install numpy

指出以下错误:

File "numpy/core/setup.py", line 289, 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.

顺便说一下,我已经安装了python dev。

此外,通过

 sudo apt-get install python-numpy

也不起作用,因为我已经为Python2.7安装了numpy,并且安装程序响应numpy已经是最新的。

我能做什么?谢谢!


Tags: installtodevnumpyyoupandas错误pip3

热门问题