Is it possible to install 2 versions of Python on Windows 7 and if so do I just need to run the separate installers? (and all will work well if I do, without any configuration?)

link|improve this question
feedback

2 Answers

up vote 1 down vote accepted

Yes. I suggest installing the version you will use the most last, because the installer adds Python to your system path adds registry entries for *.py files. These registry entries set the default "Open" action and add an "Edit with IDLE" context menu.

To use a specific version of Python, simply use the full path to the executable. And/or set the appropriate environment variables (%PATH% and %PYTHONPATH%) properly. This can be done at a Windows-wide level, then later over-ridden by a specific CMD console.


Update:

I just installed three versions of Python (2.5, 2.7, then 2.6) on Windows 7. I wanted to be able to specify which version of Python to use for "Open with IDLE", so I added some registry keys under: HKEY_CLASSES_ROOT\Python.File\shell\ in order to get two context menu items (Edit with IDLE 2.6 and Edit with IDLE 2.7):

  1. I cloned the existing Edit with IDLE key to create a new Edit with IDLE 2.7 key.
  2. Then I modified the string under the command key to use Python 2.7:
    "C:\Python27\pythonw.exe" "C:\Python27\Lib\idlelib\idle.pyw" -n -e "%1"
  3. Finally, I renamed the existing Edit with IDLE to Edit with IDLE 2.6
  4. I could have added another context menu item for Python 2.5, but I only plan to use 2.5 infrequently for Google Apps Engine.
link|improve this answer
feedback

Yes, no problem. I have it on my Windows 7 64 bit machine - I think i have Python 2.5 and 2.7 - each one was installed with other software - I think that one with Scidavis and second with Quantum GIS. Both programs are working OK. ;-)

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.