找到你要的答案

Q:install numpy for python 3.4 in ubuntu [duplicate]

Q:在Ubuntu安装Python 3.4 [复制] NumPy

This question already has an answer here:

I have python 2.7, and I installed beside it python 3.4, but python 3.4 has not numpy package. When I use sudo pip install -U numpy, it install it in python2.7 location. How can I install numpy for python 3.4 in a machine that has already python 2.7?

这个问题在这里已经有了答案:

我有2.7,我安装了Python,它旁边的Python 3.4,但Python 3.4没有NumPy包。当我使用sudo pip安装U NumPy,它安装在Python2.7的位置。我怎么安装Python 3.4机器中已经Python 2.7 NumPy?

answer1: 回答1:

You're close, to update a package for python3.4 you have to sudo pip3 install -U numpy (note the pip3).

It might be the case that you still have to install pip3 first (not sure if it is bundled). Probably for that you have to sudo apt-get install python-pip3 or something. If you have a recent Ubuntu (I believe starting from 14.10), then you already have python 3.4 when you first boot up Ubuntu, as well as pip3 pre-installed.

You can also install through ubuntu's package manager, but if you want an OS independent way, you can just use pip3.

你关闭,更新python3.4你sudo PIP3安装U NumPy包(注29)。

也许你还需要先安装PIP3(不知道是否是捆绑)。也许你需要sudo apt-get install python-pip3或什么的。如果你有一个新的Ubuntu(我相信从14.10开始),那么你就已经有了Python 3.4当您第一次启动Ubuntu,以及PIP3预装。

你也可以通过Ubuntu的软件包管理器安装,但如果你想要一个独立的操作系统,你可以使用PIP3。

answer2: 回答2:

Just install numpy for Python 3 in Software center or in terminal

sudo apt-get install python3-numpy

只要安装NumPy在软件中心或终端3蟒

sudo apt-get install python3-numpy
python  ubuntu  python-3.x  numpy