how do I set a Python installation as the default under windows ?

Sridhar Ratnakumar sridharr at activestate.com
Mon Dec 21 01:38:28 EST 2009


On 12/20/2009 1:35 AM, Stef Mientki wrote:
> Steve Holden wrote:
>> Stef Mientki wrote:
>>
>>> hello,
>>>
>>> I just upgraded from Python 2.5 to 2.6.
>>> Most of the things work,
>>> but I'm struggling with one issue,
>>> when I start Python in a command window,
>>> it still uses Python 2.5.
>>>
>>> Is there a way to get Python 2.6 as my default Python environment ?
>>>
>>> thanks,
>>> Stef Mientki
>>>
>>
>> It's a matter of replacing C:\Python25 with C:\Python26 in your PATH
>> environment variable, which is what the Windows command processor uses
>> to fined executable programs.
> Thanks Steve,
> that works exactly as you say.

Additionally if you're using ActivePython, you do not even have to 
fiddle with PATH because:

1) C:\PythonXY (and %APPDATA%\Python\Scripts) is automatically added to 
%PATH%.

2) "python.exe" is also available as "python26.exe", so you can simply 
type "python26" in the console to get Python 2.6 (if another version of 
ActivePython/Python is already installed).

-srid



More information about the Python-list mailing list