在Ubuntu 14.04.01 LTS上安装Numpy for Python3.4.0
默认情况下 ,Python3.4.0在Ubuntu 14.04.01 LTS上出现。 我们可以通过在终端`python3上输入来使用它。
我想使用Numpy for Python3.4.0。 我运行import numpy but I had an
ImportError .
所以我通过运行安装它 sudo apt-get install python-numpy
. Then I typed on Terminal:
. Then I typed on Terminal:
python3`。 然后导入numpy。 我收到了这个错误:
>>> import numpy Traceback (most recent call last): File "", line 1, in ImportError: No module named 'numpy' >>>
不过,Numpy现在正在为Python-2.7工作:
begueradj@begueradj-Bill:~$ python Python 2.7.6 (default, Mar 22 2014, 22:59:38) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import numpy >>>
如何让Numpy为Python 3.4.0工作?
打开终端并输入:
sudo apt-get install python3-numpy
python3-numpy是Python 3语言的快速数组工具。