You are not logged in.

#1 2011-03-27 11:25:06

Malvineous
Member
From: Brisbane, Australia
Registered: 2011-02-03
Posts: 190
Website

Getting Python 2.6 installed

Hi all,

I'm in the process of installing Arch Linux to move away from Gentoo.  A number of programs I am using require Python 2.6 (they haven't yet been upgraded to 2.7/3.x) so I'm trying to work out how to install Python 2.6.  Under Gentoo there are "slots" so you can have as many different versions as you want installed, and the main binary is just a symlink to the version you want to use at the time, so I'm hoping I can do something similar with Arch.

Following the 'downgrading' guide on the wiki I have found a package for python-2.6.5, but I am a little worried as the package name is "python" rather than "python2" - so I think if I install it, it will remove python3 (which is just called "python" under Arch, although this seems to be nonstandard so I'm a little unsure.)

Does anyone know if it's possible to install Python 2.6, while leaving Python 2.7 and 3.2 available for the system to use?  What command would I use to change the version run by the "python" command, like under Gentoo?

Thanks!

Offline

#2 2011-03-27 13:38:21

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Getting Python 2.6 installed

As long as you got the source code for the apps, they will work just fine with python 2.7. Only binary modules (.so) will fail.

Anyway, if you want to install python 2.6, look at the python26 PKGBUILD in aur.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#3 2011-03-28 08:33:10

Malvineous
Member
From: Brisbane, Australia
Registered: 2011-02-03
Posts: 190
Website

Re: Getting Python 2.6 installed

I'm not so sure - one of the apps I can't use is XMMS2, because the version of waf in their git repo gives syntax errors with Python 2.7, but it works on my Gentoo box with Python 2.6.

Offline

#4 2011-03-28 18:51:32

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Getting Python 2.6 installed

Malvineous wrote:

I'm not so sure - one of the apps I can't use is XMMS2, because the version of waf in their git repo gives syntax errors with Python 2.7, but it works on my Gentoo box with Python 2.6.

Sure it is actually trying to use python2 and not python(3)? and how did you install xmms2? and what is the exact error?

hint: 99.99999999% of all 2.6 code runs just fine in the 2.7 interpeter.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#5 2011-03-30 09:16:04

Malvineous
Member
From: Brisbane, Australia
Registered: 2011-02-03
Posts: 190
Website

Re: Getting Python 2.6 installed

Ah ok my bad, as I was pasting the errors in I realised that with python2 it was complaining about errors in the .pyc files that were hanging around from my Gentoo install.  Removing all the .pyc files fixed the problem.

For the record I 'switched' to python2 by changing the /usr/bin/python symlink to point to /usr/bin/python2 instead of /usr/bin/python3 as I didn't want to have to modify the scripts.  Hopefully this won't break anything, as other scripts requiring python3 should be looking for "python3" anyway.

Anyway, it seems to be working now so many thanks for your help!

Offline

#6 2011-03-30 10:41:56

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,355

Re: Getting Python 2.6 installed

Malvineous wrote:

For the record I 'switched' to python2 by changing the /usr/bin/python symlink to point to /usr/bin/python2 instead of /usr/bin/python3 as I didn't want to have to modify the scripts.  Hopefully this won't break anything, as other scripts requiring python3 should be looking for "python3" anyway.

It will, for sure. All python-dependent stuff in the Arch repos references python expecting it to be python3.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

Board footer

Powered by FluxBB