10

I guess the answer is 32-bit, but I'm a bit confused on why I can even install Anaconda 64 in a win32.

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. See for instance this issue I opened for scipy:

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

I have a 64-bit OS according to my system info. So:

  • Does 64-bit Anaconda on win32 use 32-bit or 64-bit?

(I don't know why I have a win32 on a "64-bit OS")

When I start a python session, it says:

Anaconda 2.1;0 (64-bit) (default; Jul 2 2014) [MSC v.1 500 64 bit (AMD64)] on win32.

alberto
  • 2,625
  • 4
  • 29
  • 48

3 Answers3

14

Anaconda 2.1;0 (64-bit) (default; Jul 2 2014) [MSC v.1 500 64 bit (AMD64)] on win32

Here win32 indicates that the system is Windows. The name of the Windows API on both x86 and x64 is Win32. It's exactly the same API but with different sized pointers. It is a little confusing but when you read win32, interpret that as meaning desktop Windows.

What matters here is the AMD64. That indicates the machine on which the code executes. Which is the x64 machine.

Your code is running in a 64 bit process.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
  • EXCELLENT ANSWER !! I am confused by version information when I start Python "Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 22:45:29) [MSC v.1916 32 bit (Intel)] on win32". I want to use highest performance Python, but I cannot find the 64-bit version on Python.org website, only the kit named "Windows x86-64 executable installer Windows for AMD64/EM64T/x64". So the installer actually installs both the 32-bit and 64-bit API, but this is not reflected in the version information? Is there a way to explicitly launch the 64-bit version? – Rich Lysakowski PhD Apr 10 '20 at 23:27
1

I have a 64-bit OS according to my system info

That is all that counts, and that is why the 64 bit version Anaconda runs on your system.

Where have you seen the term "Win32" on your system? Why did you infer from there that you do not have a 64 bit architecture? "Win32" is often used as a name for the Windows API itself. AFAIK it is only rarely used to indicate the actual architecture the system is compiled for.

Dr. Jan-Philip Gehrcke
  • 33,287
  • 14
  • 85
  • 130
  • When I start I python session, it says: `Anaconda 2.1;0 (64-bit) (default; Jul 2 2014) [MSC v.1 500 64 bit (AMD64)] on win32.` Actually the problem is solved if I use an Anaconda 32-bit instead. – alberto Feb 15 '15 at 16:37
  • 1
    *That* "win32" definitely **is** just Python's way to say that it's running on Windows, i.e. on the Win32 API. See, I run a Python 64 build on a 64 bit Windows on a 64 bit machine, and my Python interpreter says *"Python 3.4.1 (default, Aug 7 2014, 13:09:27) [MSC v.1600 64 bit (AMD64)] on **win32**"* – Dr. Jan-Philip Gehrcke Feb 15 '15 at 18:30
  • I see! Could you please try this snippet of code then? https://github.com/scipy/scipy/issues/4524 – alberto Feb 15 '15 at 18:49
  • You can, and many people do, run 32 bit processes on a 64 bit system. – David Heffernan Feb 15 '15 at 19:20
  • Yeap, I know, what I didn't know is whether a python 64-bit might run in 32 in a 64 machine (since I thought win32 meant you're running on 32 bits) – alberto Feb 15 '15 at 21:56
  • @alberto My comment was aimed at this answer's first paragraph – David Heffernan Feb 15 '15 at 22:18
0

The reason that the Conda python CLI is reporting win32 like this:

(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:

print(os.sys.platform)     
# win32
print(sys.platform)        
# win32
not2qubit
  • 14,531
  • 8
  • 95
  • 135