简体   繁体   English

为python 2.7安装numpy

[英]Installing numpy for Python 2.7

Trying to install numpy-1.9.2 for Python 2.7.10, installed it using command prompt using 'setup.py install'. 尝试为Python 2.7.10安装numpy-1.9.2,请使用“ setup.py install”在命令提示符下进行安装。 Seems like everything has worked but when I try and import numpy I get error saying "No module named numpy" 似乎一切正常,但是当我尝试导入numpy时出现错误,提示“没有名为numpy的模块”

As @gurpinars said, try: 正如@gurpinars所说,请尝试:

pip install numpy

in console. 在控制台中。 It will install the most recent version. 它将安装最新版本。 Or you can write: 或者您可以写:

pip install numpy --upgrade

to upgrade to the newer version. 升级到较新的版本。

I generally just avoid the whole numpy install process by using the Anaconda distribution from Continuum.io . 我通常只使用Continuum.io的Anaconda发行版来避免整个numpy安装过程。 No, I am not a paid spokesperson, haha. 不,我不是付费发言人,哈哈。 But in reality, whether you use anaconda or even the Enthought distribution, this is a lot easier than trying to install these packages with pip. 但是实际上,无论您使用anaconda还是Enthought发行版,这都比尝试使用pip安装这些软件包要容易得多。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM