Python Numpy安装Windows 10 64位 [英] Python Numpy Installation Windows 10 64-bit

查看:137
本文介绍了Python Numpy安装Windows 10 64位的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道在python堆栈溢出时有多个关于numpy和pyserial安装的帖子,但是不知何故,它们似乎都不适合我.

I know that there have been multiple posts on numpy and pyserial installation in python on stack overflow, but somehow none of them seem to work for me.

可能,我无法清楚地了解自己的工作并陷入困境

Possibly, i am not able to clearly understand what i have done and am stuck

我将列出我认为与解决问题有关的事情.

I will list down the things i did that i think are relevant to solving the question.

请求-在将我的问题标记为重复之前,请帮助我找到解决方案.

A request- Please help me reach a solution before marking my question as a repeat.

您需要了解的知识-64位,Windows10,Python3.4,Python2.6.1,Python 2.7

Things you need to know- 64bit, Windows10, Python3.4, Python2.6.1, Python 2.7

我尝试过的事情-

1)使用NUMPY的Official git存储库->尝试使用命令提示符将其安装为:-

1) used the Official git repository for NUMPY -> tried to install it using the command prompt as:-

C:\ Desktop \ numpy-1.9.2 \ numpy-1.9.2> python setup.py install

C:\Desktop\numpy-1.9.2\numpy-1.9.2> python setup.py install

[这时使用了Python 3.4,因为语句"python"只是给出了3.4版作为响应]

[ At this point Python 3.4 was used because the statement "python" simply gave version 3.4 as a response ]

2)然后尝试使用非官方网站

2) then tried using the unofficial site

3)尝试使用点子"

3) tried using "pip"

4)尝试了.whl文件和.tar.gz文件

4) tried a .whl file and .tar.gz file

5)下载了Visual C ++,并尝试重新安装每个

5) Downloaded Visual C++ and tried reinstalling each

6)多次弄乱环境变量

6) messed up with environment variables a couple of times

7)对于pyserial,我试图在python 3.4中获取它,但我一直未能做到这一点

7) for pyserial, i was trying to get it in python 3.4 and i failed to do so consistently

8)在尝试各种方法的同时多次卸载并安装了python 2.7和3.4

8) uninstalled and installed python 2.7 and 3.4 multiple times while trying out various methods

9)最后,我下载了"conda" 并尝试使用它.设置更多的环境变量,现在它可以在命令提示符窗口中运行,但不能让我打开IDLE 有人可以建议一种方式来理解我的工作并且可能以一种更好的方式来做吗?

9) finally i downloaded "conda" and tried using that. Set up more environment variables and now it is working in command prompt window but doesnt let me open the IDLE Can someone suggest a way to understand what i have done and possibly do it in a better way?

编辑- 现在,当我键入"python"时,它将显示以下内容:-

EDIT- Now when i type "python", it shows the following:-

Python 2.7.9 | Continuum Analytics,Inc. | (默认值,2014年12月18日,16:57:52)[win32上的[MSC v.1500 64位(AMD64)]] 键入帮助",版权",信用"或许可证"以获取更多信息. Anaconda由Continuum Analytics带给您. 请签出: http://continuum.io/thanks https: //binstar.org

Python 2.7.9 |Continuum Analytics, Inc.| (default, Dec 18 2014, 16:57:52) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. Anaconda is brought to you by Continuum Analytics. Please check out: http://continuum.io/thanks and https://binstar.org

我可以在命令提示符下导入numpy,但无法打开IDLE

I can import numpy in command prompt but cant open IDLE

推荐答案

您安装了Anaconda,这是一个不错的起点.

You installed Anaconda, which is a nice starting point.

您正在尝试手动编译,这是不必要的. 默认情况下,Numpy已安装在Anaconda环境中.

You are trying to manually compile, which is not necessary. Numpy is installed within the Anaconda environment by default.

因此,如果您正确安装了Anaconda,则将可以进行以下操作:

So if you correctly installed Anaconda, the following will work:

conda update --prefix #PATHNAME #name <- directory where conda is installed.

就我而言:

conda update --prefix C:\Users\NAME\Anaconda anaconda

只需确保您没有冲突的python环境. conda或常规python安装.

Just ensure that you do not have conflicting python environments. Either conda or regular python install.

要检查其是否有效,请使用以下命令:

To check whether it worked, use the following:

(在命令行中)

python
>>>import numpy
>>>numpy.__version__

如果它不返回"1.9.0",则出了点问题,我很高兴听到发生了什么事.

If it does not return '1.9.0' something went wrong, and I'd be happy to hear what happened.

对于编辑器:如果您在python环境(conda)中安装了空闲设备,则应该能够顺利运行.

As for the editor: if you have idle installed within your python environment (conda), you should be able to run it without a hitch.

如果您对使用哪种编辑器并不特别挑剔,则可以使用spyder模块,默认情况下,该模块也随Anaconda一起提供.

If you are not particularly picky about which editor to use though, you can use the spyder module, which also comes with Anaconda by default.

您可以从Windows的开始菜单中运行它,也可以在命令行中键入spyder来运行它.

You can run it from the windows start menu, or by typing spyder in your command line.

这篇关于Python Numpy安装Windows 10 64位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆