Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #30810

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

From Mark Lawrence <breamoreboy@yahoo.co.uk>
Subject Re: Coexistence of Python 2.x and 3.x on same OS
Date 2012-10-05 13:29 +0100
References <k4a5m9$l2k$1@dont-email.me> <e8jas.240866$uJ4.171815@fx18.am4> <k4mj13$fof$1@dont-email.me>
Newsgroups comp.lang.python
Message-ID <mailman.1850.1349440158.27098.python-list@python.org> (permalink)

Show all headers | View raw


On 05/10/2012 13:15, Edward Diener wrote:
> On 10/1/2012 12:02 PM, Alister wrote:
>> On Sun, 30 Sep 2012 15:14:17 -0400, Edward Diener wrote:
>>
>>> Has there been any official software that allows both the Python 2.x and
>>> 3.x releases to coexist on the same OS so that the end-user can easily
>>> switch between them when invoking Python scripts after each has been
>>> installed to their own directories/folders ?
>>>
>>> I know of some unoffical solutions, but they require lots of tweaks.
>>> Given the vagaries of the different OSs on which Python can run I am
>>> hoping for some offical solution which will work on any of the most
>>> popular OSs ( Windows, Linux, Mac ).
>>>
>>> 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.
>>
>> on my fedora system it was a simple matter of:-
>> #> yum install python3
>>
>> to use python 3 i specify it in my shebang line
>>
>> #!/usr/bun/env python3
>>
>> Simple
>>
>> Not sure about Windoze though (Although from memory the install asks
>> where to install so should not be a major issue)
>
> Windows installs of Python do not distinguish releases by Pythonx(.x)
> but just install different versions of Python in different directories.
> However one can make links to the different versions based on their
> release numbers, and that would allow a shebang line work if it was
> supported.
>
>

Please read this http://www.python.org/dev/peps/pep-0397/ and let us 
know whether or not it fits your needs on Windows.

-- 
Cheers.

Mark Lawrence.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Coexistence of Python 2.x and 3.x on same OS Edward Diener <eldiener@tropicsoft.invalid> - 2012-09-30 15:14 -0400
  Re: Coexistence of Python 2.x and 3.x on same OS Andrew Berg <bahamutzero8825@gmail.com> - 2012-09-30 14:38 -0500
    Re: Coexistence of Python 2.x and 3.x on same OS Edward Diener <eldiener@tropicsoft.invalid> - 2012-09-30 23:06 -0400
      Re: Coexistence of Python 2.x and 3.x on same OS Andrew Berg <bahamutzero8825@gmail.com> - 2012-09-30 22:54 -0500
      Re: Coexistence of Python 2.x and 3.x on same OS Dave Angel <d@davea.name> - 2012-09-30 23:55 -0400
      Re: Coexistence of Python 2.x and 3.x on same OS Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-10-01 09:28 +0100
      Re: Coexistence of Python 2.x and 3.x on same OS Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-10-01 13:32 -0400
        Re: Coexistence of Python 2.x and 3.x on same OS Edward Diener <eldiener@tropicsoft.invalid> - 2012-10-05 08:06 -0400
      Re: Coexistence of Python 2.x and 3.x on same OS David Robinow <drobinow@gmail.com> - 2012-10-01 15:36 -0400
      Re: Coexistence of Python 2.x and 3.x on same OS Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-10-01 20:46 +0100
    Re: Coexistence of Python 2.x and 3.x on same OS Edward Diener <eldiener@tropicsoft.invalid> - 2012-10-05 08:16 -0400
  Re: Coexistence of Python 2.x and 3.x on same OS Alister <alister.ware@ntlworld.com> - 2012-10-01 16:02 +0000
    Re: Coexistence of Python 2.x and 3.x on same OS Edward Diener <eldiener@tropicsoft.invalid> - 2012-10-05 08:15 -0400
      Re: Coexistence of Python 2.x and 3.x on same OS Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-10-05 13:29 +0100
      Re: Coexistence of Python 2.x and 3.x on same OS Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-10-05 17:32 -0400
        Re: Coexistence of Python 2.x and 3.x on same OS Edward Diener <eldiener@tropicsoft.invalid> - 2012-10-05 20:51 -0400
  Re: Coexistence of Python 2.x and 3.x on same OS wxjmfauth@gmail.com - 2012-10-06 00:27 -0700
    Re: Coexistence of Python 2.x and 3.x on same OS Ian Kelly <ian.g.kelly@gmail.com> - 2012-10-06 21:13 -0600

csiph-web