1

I have installed a new version of Python, so I want to make sure when Python is invoked that version is first in my path. So, now on my 'C' drive I have "Python27" and "Python32" (old and new version, respectively).

When I type "python" in the command line I get "Python 2.7". Using control panel I have changed the "path" and "pythonpath" user variables (from 'C:\Python27' to 'C:\Python32') and to be sure I have reload the system. It still does not work. Does anyone have any idea how I can force the system to use the new version of Python?

ADDED

May be this is important. When I go to the 'Python32' directory and type in command line 'python', I do get the new version.

octopusgrabbus
  • 10,555
  • 15
  • 68
  • 131
Roman
  • 124,451
  • 167
  • 349
  • 456

2 Answers2

1

I know you say you've updated %PATH%. However, from the description of the symptoms it is almost certain that c:\Python27 still appears on the %PATH% instead of (or before) c:\Python32.

To diagnose, start cmd.exe and type set. Then locate PATH and see what Python directories it contains and in what order.

NPE
  • 486,780
  • 108
  • 951
  • 1,012
1

Personally, I put the dirs to all installed Python versions in %PATH%, but changed the executable names for all but the 'default' version. E.g., I have a C:\Python26\Python.exe, C:\Python27\Python27.exe and a C:\Python32\Python32.exe. This way I can easily start any version from the command line.

Junuxx
  • 14,011
  • 5
  • 41
  • 71