Determining 32 bit vs 64 bit Python and numpy

"Martin v. Löwis" martin at
Mon May 25 17:54:45 EDT 2009

> I am looking for a robust, cross-platform way to determine if I am on a
> 32 bit or a 64 bit Python and if the numpy installation is also 32 bit
> or 64 bit.

You can find out the size of a pointer with struct.calcsize("P") * 8.
Numpy will have the same configuration if you can import it.


More information about the Python-list mailing list