Coexistence of Python 2.x and 3.x on same OS

Dave Angel d at davea.name
Sun Sep 30 23:55:05 EDT 2012


On 09/30/2012 11:06 PM, Edward Diener wrote:
> On 9/30/2012 3:38 PM, Andrew Berg wrote:
>> On 2012.09.30 14:14, Edward Diener wrote:
>>> The situation is so confusing on Windows, where the file associations,
>>> registry entries, and other internal software which allows a given
>>> Python release to work properly when invoking Python is so complicated,
>>> that I have given up on trying to install more than one Python release
>>> and finding a relaible, foolproof way of switching between them. So
>>> although I would like to use the latest 3.x series on Windows I have
>>> decide to stick with the latest 2.x series instead because much
>>> software
>>> using Python does not support 3.x yet.
>>
>> http://www.python.org/dev/peps/pep-0397/
>>
>> Unix-based OSes should already obey the shebang line, and on Windows,
>> there's py.exe in 3.3 that will launch the intended version based on
>> that shebang line.
>
> The problem with that is that one has to already being using 3.3 to
> use this facility. I was hoping for a solution which was backwards
> compatible with Python 2.x.
>
> My thought is a program distributed by Python which finds the versions
> of Python on an OS, lets the end-user choose which version should be
> invoked when Python is invoked, and does whatever is necessary to make
> that version the default version.
>
>> While I was using the alpha/beta versions of 3.3, I
>> had no problems invoking either 3.2 or 3.3 with the shebang line on
>> Windows.
>
> That does not solve the problem for Python 2.x distributions.
>

If you read the Pep, it says the launcher will work for both 2.x and 3.x
    http://www.python.org/dev/peps/pep-0397/
<http://www.python.org/dev/peps/pep-0397/>

I've read that elsewhere, but I can't see just where you would get the
necessary modules to run it with 2.x   Possibly you'd have to build it
from sources, as there are Windows binaries that get installed to the
C:\Windows directory.

-- 

DaveA




More information about the Python-list mailing list