How do I install Python 2.7.3 32 bit and 64 bit on Windows side by side
Asked Answered
A

4

33

I have Windows Vista 64.

I have some projects requiring Python 2.7.3 64 bit and others requiring Python 2.7.3 32 bit (because some extensions do not work in 64 bit).

How do I prevent the Python 2.7.3 MSI installer (32 or 64 bot) from deleting the other version.

Side by side worked for me with Python 2.7.2 without problems.

Anarchist answered 17/4, 2012 at 7:35 Comment(2)
It looks like an installer bug specific to 2.7.3Laomedon
as a work around you could just use a virtual machine until they fix the issue, i have same problemAvellaneda
L
29

This appears to be working for me on Windows 7 64 bit. Choose one version to be your default installation, e.g. 64 bit, and install it first. Before doing anything else install the other version.

Specify a different installation directory and in the Customize Python 2.7.3 screen select Register Extensions and select Entire feature will be unavailable.

Laomedon answered 16/9, 2012 at 16:2 Comment(1)
This works perfectly. Thanks so much Nicola. I believe the "Register Extensions and select Entire feature will be unavailable" is quite crucial because it is what decides which will be your default python.Airflow
E
3

You can generally install multiple Python Version side by side. When installing in Windows, apart from file installation, registry is also updated so that any subsequent package/tools installation can enumerate all the Python Installation in the current m/c. Only problem happens if the installation is for the same version but different bitness. As because, the registry Path SOFTWARE\Python\Pythoncore\ does not differentiates with the bitness and bug-fix, you would end up overlaying the InstallPath and PythonPath if you are installation same version with different bug-fix or different bitness.

Solution

  • Install two different Versions for different bitness.
  • Prepare a script to update the registry key each time you want to switch between the bitness. I happened to stumble upon a simple similar script in effbot which does the Job.

Update

As Ruediger Jungbeck pointed out that he can see two different registry keys, I suddenly recollected an important change post Vista. On a 64 bit system in order to enable accessing the registry keys from 32 bit and 64 bit application, Windows splits the registry at important nodes. For 64 bit applications, its the native registry path but for 32 bit applications its the WoW6432Node. So when running a 32 bit Version of Python\Tools\extension, it will only see the Wow6432Node. 64 bit applications will only see the native node. There are APIs to access the cross bitness nodes but that is outside the scope of this question. So to summarize, windows intelligently handles 32 and 64 bit applications by splitting the node which will allow 32 bit extensions to transparently access the 32 bit Python Installation.

Endearment answered 17/4, 2012 at 7:53 Comment(2)
I can find 2 different values. One in HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.7 pointing to the 64 bit version and one HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.7 pointing to the 32 bit version, so I would expect that each bitness finds it's Python. But why does the installer sees both?Anarchist
i have seen your update, but that does not skolve my problem. I want both bitnesses installed at the same time ( on the same system)Anarchist
C
2

While installing 2nd python, for Register Extensions select "Entire feature will be unavailable" option. Python 64 Installation path will be in registry "HKLM:SOFTWARE\Python\PythonCore\2.7\InstallPath"

Python 64 bit PythonPath will be in "HKLM:SOFTWARE\Python\PythonCore\2.7\PythonPath"

Python 32 Installation path will be in registry "HKLM:SOFTWARE\Wow6432Node\Python\PythonCore\2.7\InstallPath"

Python 32 bit PythonPath will be in "HKLM:SOFTWARE\Wow6432Node\Python\PythonCore\2.7\PythonPath"

Customize Python with disabling extions

Conquistador answered 6/4, 2016 at 5:32 Comment(0)
P
0

Can installing 32-bit python on other user and install 64-bit on the other user, solve this problem?

Perm answered 13/5, 2022 at 0:15 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.