D A
D A

Reputation: 3438

Do I have Numpy 32 bit or 64 bit?

How do I check if my installed numpy version is 32bit or 64bit?

Bonus Points for a solution which works inside a script and is system independent.

Upvotes: 15

Views: 13353

Answers (2)

unutbu
unutbu

Reputation: 879769

In [65]: import numpy.distutils.system_info as sysinfo

In [69]: sysinfo.platform_bits
Out[69]: 64

This is based on the value returned by platform.architecture():

In [71]: import platform
In [72]: platform.architecture()
Out[74]: ('64bit', 'ELF')

Upvotes: 22

Dmitry Rubanovich
Dmitry Rubanovich

Reputation: 2627

64 bit python won't load 32 bit NumPy (at least that has been my experience with 2.7.10 python and "official" distribution of NumPy for Windows). So start Python (if you have both 32 bit version and 64 bit version do it for each one) and then try to import NumPy module. If it works with 32 bit Python, then it's a 32 bit version of NumPy. If it works with 64 bit Python, then it's a 64 bit version of NumPy.

Upvotes: 6

Related Questions