5

I have two python installations, 2.5 and 2.6 I want to change the default python interpreter from 2.5 to 2.6. Anyone know how?

Diones
  • 1,425
  • 2
  • 19
  • 26

2 Answers2

10

PYTHONPATH is NOT what you are looking for. That is for varying where Python's "import" looks for packages and modules.

You need to change the PATH variable in your environment so that it contains e.g. "....;c:\python26;...." instead of "....;c:\python25;....". Click on start > control panel > system > advanced > environment variables. Select "path". Edit it. Click on OK enough times to get out of there.

John Machin
  • 81,303
  • 11
  • 141
  • 189
  • I know, but on his link there is a topic about the path so I just edited it and now everything is working. Sorry but he answered first – Diones Jun 29 '09 at 20:43
  • Note that this won't change file extension associations. For those, see http://superuser.com/questions/310335/how-do-i-change-the-file-association-to-a-program-with-the-same-name-in-windows/1052785#1052785 – ivan_pozdeev Mar 14 '16 at 17:50
1

just FYI, since both c:\python25 and c:\python26 are on PATH, I copy C:\Python25\python.exe to C:\Python25\py25.exe, and copy C:\Python26\python.exe to C:\Python26\py26.exe Then just type py25(or py26) get the specific version.

sunqiang
  • 6,422
  • 1
  • 32
  • 32