older pythons
hi everybody. i have a certain set of old python scripts and data used by said scripts which were written using python 2.3 in particular i used some features which were later modified or deprecated by the language newer versions (e.g.: cmp(), print as keyword, and such...) for reasons i find hard to explain briefly, it is unfeasible at the moment to modify scripts and data to adapt to the changes now: i ask if it is possible to have different versions of python installed on my system (linux debian) so that i can continue to use python 2.3 (as python from the shell) but i can also use - say - python 3.1 (maybe as python3.1 from the shell) if yes: is there a known recommended way to do so? thanks a lot bye -- http://mail.python.org/mailman/listinfo/python-list
Re: older pythons
The recommended Debian way is update-alternatives. I find it a bit unintuitive, so I have to read through the documentation every time I use it, but it should be able link a chosen version of python to /usr/ bin/python. I don't know if it's set up by default, I have only one version installed. -- Adrian -- http://mail.python.org/mailman/listinfo/python-list
Re: older pythons
Adrian Dziubek wrote: The recommended Debian way is update-alternatives. I find it a bit unintuitive, so I have to read through the documentation every time I use it, but it should be able link a chosen version of python to /usr/ bin/python. I don't know if it's set up by default, I have only one version installed. -- Adrian what i was asking for is about a way to *INSTALL* and mantain different python versions, a task i think is not unusal for developers. thanks anyway for reply bye -- http://mail.python.org/mailman/listinfo/python-list
Re: older pythons
superpollo wrote: Adrian Dziubek wrote: The recommended Debian way is update-alternatives. I find it a bit unintuitive, so I have to read through the documentation every time I use it, but it should be able link a chosen version of python to /usr/ bin/python. I don't know if it's set up by default, I have only one version installed. -- Adrian what i was asking for is about a way to *INSTALL* and mantain different python versions, a task i think is not unusal for developers. thanks anyway for reply bye Installing several minor versions (e.g. 2.3, 2.4, 2.5, 3.0) in parallel has always been supported. Just install them and it should work automagically. However changing the system's default /usr/bin/python is NOT recommended, especially in linux systems that rely heavily on python for many of the system tools. If you install from source, you need to check for some settings to ensure the installer does not install the /usr/bin/python's symlink. If you install from a package manager, they usually doesn't change the symlink and you'll need to run a separate program to change the symlinks (e.g. python-updater in Gentoo, which will also updates all installed python packages to the appropriate version. Neat.). The easiest way to make a specific script use a specific version of python is by changing its hashbang (#!) line: instead of: #!/usr/bin/env python use #!/usr/bin/env python2.3 or whatever version it should run on. AFAIK, no major linux distributions have officially ported to python 3.x. This means switching /usr/bin/python to python3.1 will definitely break your system. As an alternative, you can always explicitly specify the version number of python you want to use: $ python2.5 Python 2.5.4 (r254:67916, Jul 5 2009, 04:12:16) [GCC 4.3.2] on linux2 Type help, copyright, credits or license for more information. exit() $ python2.6 Python 2.6.2 (r262:71600, Jul 5 2009, 04:08:11) [GCC 4.3.2] on linux2 Type help, copyright, credits or license for more information. exit() $ python3.0 Python 3.0.1 (r301:69556, Jul 5 2009, 04:03:20) [GCC 4.3.2] on linux2 Type help, copyright, credits or license for more information. exit() $ python3.0 need3.py happily running with python 3.0 $ python2 need3.py SillyError: not running with python 3.0 -- http://mail.python.org/mailman/listinfo/python-list
Re: older pythons
Lie Ryan wrote: AFAIK, no major linux distributions have officially ported to python 3.x. http://packages.debian.org/experimental/python3.1 thanks for help -- http://mail.python.org/mailman/listinfo/python-list
Re: older pythons
superpollo wrote: Lie Ryan wrote: AFAIK, no major linux distributions have officially ported to python 3.x. http://packages.debian.org/experimental/python3.1 thanks for help Note the word experimental -- http://mail.python.org/mailman/listinfo/python-list
Re: older pythons
Lie Ryan wrote: superpollo wrote: Lie Ryan wrote: AFAIK, no major linux distributions have officially ported to python 3.x. http://packages.debian.org/experimental/python3.1 thanks for help Note the word experimental i noticed. isn't experimental official? i thought it was... thanks for your reply bye and god bless you -- http://mail.python.org/mailman/listinfo/python-list
Re: older pythons
superpollo wrote: what i was asking for is about a way to *INSTALL* and mantain different python versions, a task i think is not unusal for developers. Check out virtualenv, I ask myself how I could work without it. http://pypi.python.org/pypi/virtualenv -- http://mail.python.org/mailman/listinfo/python-list
Re: older pythons
Marco Mariani wrote: superpollo wrote: what i was asking for is about a way to *INSTALL* and mantain different python versions, a task i think is not unusal for developers. Check out virtualenv, I ask myself how I could work without it. http://pypi.python.org/pypi/virtualenv much obliged! -- http://mail.python.org/mailman/listinfo/python-list
Re: older pythons
On Thu, Jul 9, 2009 at 8:10 AM, Lie Ryanlie.1...@gmail.com wrote: superpollo wrote: Lie Ryan wrote: AFAIK, no major linux distributions have officially ported to python 3.x. http://packages.debian.org/experimental/python3.1 thanks for help Note the word experimental Assuming that Debian does the same thing as Ubuntu (which is highly likely), Python3.1 won't install itself as the default. Too many system features depend on Python 2.x. -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
Re: older pythons
superpollo wrote: Lie Ryan wrote: superpollo wrote: Lie Ryan wrote: AFAIK, no major linux distributions have officially ported to python 3.x. http://packages.debian.org/experimental/python3.1 Note the word experimental i noticed. isn't experimental official? i thought it was... Official as in official release? -- http://mail.python.org/mailman/listinfo/python-list