简体   繁体   English

win32 上的 64 位 Anaconda 使用 32 位还是 64 位?

[英]Does 64-bit Anaconda on win32 uses 32-bit or 64-bit?

I guess the answer is 32-bit, but I'm a bit confused on why I can even install Anaconda 64 in a win32.我想答案是 32 位的,但我对为什么我什至可以在 win32 中安装 Anaconda 64 感到有些困惑。

I used to work on Anaconda 64-bit but I just realized that my system is win32 and this generated some exceptions from time to time.我曾经在 Anaconda 64 位上工作,但我刚刚意识到我的系统是 win32,这不时产生一些异常。 See for instance this issue I opened for scipy:例如,请参阅我为 scipy 打开的这个问题:

https://github.com/scipy/scipy/issues/4524 https://github.com/scipy/scipy/issues/4524

I have a 64-bit OS according to my system info.根据我的系统信息,我有一个 64 位操作系统。 So:所以:

  • Does 64-bit Anaconda on win32 use 32-bit or 64-bit? win32 上的 64 位 Anaconda 是使用 32 位还是 64 位?

(I don't know why I have a win32 on a "64-bit OS") (我不知道为什么我在“64 位操作系统”上有一个 win32)

When I start a python session, it says:当我开始一个 python 会话时,它说:

Anaconda 2.1;0 (64-bit) (default; Jul 2 2014) [MSC v.1 500 64 bit (AMD64)] on win32. Anaconda 2.1;0(64 位)(默认;2014 年 7 月 2 日)[MSC v.1 500 64 位 (AMD64)] 在 win32 上。

Anaconda 2.1;0 (64-bit) (default; Jul 2 2014) [MSC v.1 500 64 bit (AMD64)] on win32 Anaconda 2.1;0(64 位)(默认;2014 年 7 月 2 日)[MSC v.1 500 64 位 (AMD64)] 在 win32 上

Here win32 indicates that the system is Windows.这里win32表示系统是Windows。 The name of the Windows API on both x86 and x64 is Win32. x86 和 x64 上的 Windows API 的名称都是 Win32。 It's exactly the same API but with different sized pointers.它是完全相同的 API,但具有不同大小的指针。 It is a little confusing but when you read win32, interpret that as meaning desktop Windows.这有点令人困惑,但是当您阅读 win32 时,将其解释为桌面 Windows。

What matters here is the AMD64.这里重要的是AMD64。 That indicates the machine on which the code executes.这表示代码执行的机器。 Which is the x64 machine.这是x64机器。

Your code is running in a 64 bit process.您的代码在 64 位进程中运行。

I have a 64-bit OS according to my system info根据我的系统信息,我有一个 64 位操作系统

That is all that counts, and that is why the 64 bit version Anaconda runs on your system.这就是最重要的,这就是为什么 64 位版本的 Anaconda 在您的系统上运行的原因。

Where have you seen the term "Win32" on your system?你在你的系统上在哪里看到过“Win32”这个词? Why did you infer from there that you do not have a 64 bit architecture?你为什么从那里推断你没有 64 位架构? "Win32" is often used as a name for the Windows API itself. “Win32”通常用作 Windows API 本身的名称。 AFAIK it is only rarely used to indicate the actual architecture the system is compiled for. AFAIK 它很少用于指示系统编译的实际架构。

A friend of mine was running a 32 bit version of Windows on his x64 based processor. 我的一个朋友在他的基于x64的处理器上运行32位版本的Windows。 He opted to use the 32-bit version of anaconda, as he was not sure if the calls through the stack would be influenced by the 32 bit windows and thus cause issues with the storage of data types in memory (ie be several bits short of a full address) 他选择使用32位版本的anaconda,因为他不确定通过堆栈的调用是否会受到32位窗口的影响,从而导致内存中数据类型存储的问题(即几位不足一个完整的地址)

The reason that the Conda python CLI is reporting win32 like this: Conda python CLI 报告win32如下:

(base)  $ python.exe
Python 3.7.6 (default, Jan  8 2020, 20:23:39) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32

is most ikely a confusing artifact of how the windows python is handling sys, os in the following:最有可能是 windows python 如何处理sys, os的令人困惑的工件,如下所示:

print(os.sys.platform)     
# win32
print(sys.platform)        
# win32

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

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