I have a win7 64bit installation. Must I use Python 64bit? What are the differences between the 32bit and 64bit Python versions anyway? Do different Python packages (such as south, django, mysqldb etc) support only 32bit/64bit?
-
2Related https://stackoverflow.com/q/4567856/460775 – EMBarbosa Sep 15 '17 at 17:50
7 Answers
64 bit version will allow a single process to use more RAM than 32 bit, however you may find that the memory footprint doubles depending on what you are storing in RAM (Integers in particular).
For example if your app requires > 2GB of RAM, so you switch from 32bit to 64bit you may find that your app is now requiring > 4GB of RAM.
Check whether all of your 3rd party modules are available in 64 bit, otherwise it may be easier to stick to 32bit in the meantime

- 295,403
- 53
- 369
- 502
-
14Afaik, there are no 64bit binaries for MysqlDB - that's the reason I stick with 32bit Python. – Jochen Ritzel Jun 25 '10 at 12:39
-
13Do the 3rd party modules really need to explicitly support 64bit? – Jonathan Livni Jun 26 '10 at 14:38
-
8I have been using 64bit Python 2.7 for the last several months (five years after this post) and although I would say it is definitely worth it - having access to all that RAM is pretty nice if you don't want to waste as much time managing your data - there are still several libraries which are either slightly annoying to get 64-bit versions of, or in many cases nearly impossible to use (32-bit DLL's are one such example of a resource I have not managed to leverage yet without loading a 32-bit version of Python) – Darren Ringer Mar 14 '15 at 19:28
-
14There is also the opposite: tensorflow is only available for 64bit python on windows, except if you want to build it. – TrakJohnson Mar 14 '17 at 07:43
In my experience, using the 32-bit version is more trouble-free. Unless you are working on applications that make heavy use of memory (mostly scientific computing, that uses more than 2GB memory), you're better off with 32-bit versions because:
- You generally use less memory.
- You have less problems using COM (since you are on Windows).
- If you have to load DLLs, they most probably are also 32-bit. Python 64-bit can't load 32-bit libraries without some heavy hacks running another Python, this time in 32-bit, and using IPC.
- If you have to load DLLs that you compile yourself, you'll have to compile them to 64-bit, which is usually harder to do (specially if using MinGW on Windows).
- If you ever use PyInstaller or py2exe, those tools will generate executables with the same bitness of your Python interpreter.

- 8,297
- 1
- 31
- 27
-
2
-
Wow. My desktop can’t even run 32-bit binaries any more. I don’t think this was sound advice even in 2017. Points 3 and 4 really are reasons to use 64-bit Python, since most libraries are built for a 64-bit world, and most compilers build 64-bit binaries by default. I’m pretty sure this was the case in 2017 too. MATLAB dropped its 32-bit Linux version in 2012 and 32-bit Windows version in 2016. – Cris Luengo Jun 28 '23 at 13:50
You do not need to use 64bit since windows will emulate 32bit programs using wow64. But using the native version (64bit) will give you more performance.

- 28,510
- 21
- 92
- 151
Use the 64 bit version only if you have to work with heavy amounts of data, in that scenario, the 64 bits performs better with the inconvenient that John La Rooy said; if not, stick with the 32 bits.

- 199
- 2
- 6
I had trouble running python app (running large dataframes) in 32 - got MemoryError message, while on 64 it worked fine.

- 41
- 1
Machine learning packages like tensorflow 2.x are designed to work only on 64 bit Python as they are memory intensive.

- 406
- 3
- 7
I was using 32 bit version since getting the torch install error. Then i download 64 bit python problem solved.

- 308
- 2
- 10