我正在使用Ubuntu 12.04并希望与python 2.7并排使用python 3.4.
python 3.4的安装工作正常.但是,我无法安装python 3的numpy包(因此我无法安装scipy,pandas等).
运用
sudo pip3 install numpy
Run Code Online (Sandbox Code Playgroud)
吐出以下错误:
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.
Run Code Online (Sandbox Code Playgroud)
顺便说一句,我已经安装了python-dev.
而且,安装numpy via
sudo apt-get install python-numpy
Run Code Online (Sandbox Code Playgroud)
不起作用,因为我已经为python 2.7安装了numpy,安装程序响应numpy已经是最新的.
我能做什么?谢谢!