Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

0 views
Skip to first unread message

Stef Mientki

unread,
Dec 19, 2009, 11:50:25 AM12/19/09
to pytho...@python.org
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

Steve Holden

unread,
Dec 19, 2009, 7:20:29 PM12/19/09
to pytho...@python.org, pytho...@python.org

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. It's normal to add both the directory the
interpreter lives in /and/ its Scripts subdirectory, so you may have
two replacements to make. See

http://www.python.org/doc/faq/windows/

for more. If anyone has any good updates to that document I'll be happy
to make them (or give you permission to make them ...). It was written a
long time ago, and I'm not sure it's had much love. In particular
there'll not be anything relating to Windows 7.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon is coming! Atlanta, Feb 2010 http://us.pycon.org/
Holden Web LLC http://www.holdenweb.com/
UPCOMING EVENTS: http://holdenweb.eventbrite.com/

Steve Holden

unread,
Dec 19, 2009, 7:20:29 PM12/19/09
to Stef Mientki, pytho...@python.org

Sridhar Ratnakumar

unread,
Dec 21, 2009, 1:38:28 AM12/21/09
to Stef Mientki, pytho...@python.org
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

0 new messages