Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does the Python 2.7 AMD 64 installer seem to run Python in 32 bit mode?

I've installed Python 2.7 from the python-2.7.amd64.msi package from python.org. It installs and runs correctly, but seems to be in 32-bit mode, despite the fact that the installer was a 64 bit installer.

Python 2.7 (r27:82525, Jul  4 2010, 07:43:08) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys, platform
>>> platform.architecture()
('64bit', 'WindowsPE')
>>> sys.maxint
2147483647

What can I do to install Python so that it actually runs in 64-bit mode?

like image 325
Bryan Catanzaro Avatar asked Aug 05 '10 01:08

Bryan Catanzaro


People also ask

Why is Python 3 64-bit called AMD64?

".amd64" is a file extension for 64 bit binaries. While ".exe" is more common, the Python 3 64-bit installer is probably labeled ".amd64" to specify that it is meant to be run on 64-bit machines. Thanks for contributing an answer to Stack Overflow!

Which version of python do I have installed on Windows?

The one that you will find in the shortcut from Start > All Programs > ArcGIS > Python 2.7 will correspond to the last one you installed, in this case it seems Server and the 64 bit version.

How to fix installed Python3 but still Python 2 7 is used?

How To Fix Installed Python3 But Still Python 2.7 Is Used Error. Now when you execute the python command in a terminal, you will find it still uses the old version which is 2.7. To use the new Python version, you need to run python3 in the terminal. Type "help", "copyright", "credits" or "license" for more information.

What version of Python is installed with ArcGIS for desktop?

The desktop install came with the 32-bit version of Python 2.7, and the server install came with the 64-bit version. I seem to now have a conflict between both versions when I try to work with Python on ArcGIS for Desktop.


1 Answers

See the discussion here. It's from 2.6.1, but it seems to still apply. I haven't seen evidence to the contrary anywhere, at least. The gist of the matter (quoted from that link) is:

This is by design. In their infinitive wisdom Microsoft has decided to make the 'long' C type always a 32 bit signed integer - even on 64bit systems. On most Unix systems a long is at least 32 bit but usually sizeof(ptr).

like image 110
eldarerathis Avatar answered Nov 14 '22 23:11

eldarerathis