You are not logged in.

#1 2008-11-04 14:35:50

compengi
Member
Registered: 2008-11-04
Posts: 9

Python 2.5 altinstall

I have upgraded Arch yesterday from Python 2.5 to 2.6, but it seems there are some difficulties running the newest version with supybot. So I want to roll back the upgrade, how do I do this? If someone could be kind to right down the steps?

Offline

#2 2008-11-08 13:46:21

EVRAMP
Member
From: Czech Republic
Registered: 2008-10-03
Posts: 173
Website

Re: Python 2.5 altinstall

Arch repos dont contain older versions, there are allways only the newest, that's the Arch way..
If you would like to downgrade you have 2 possibilities:

1) Check if python 2.5 is in /var/cache/pacman/pkg/
If you find it there, you can simply use pacman -U /var/cache/pacman/pkg/name-of-python2.5-package
...It should be there, if you havent cleaned the cache using command pacman -Sc

2) If you will not find python 2.5 in the cache the only possibility is to download older PKGBUILD from repos.archlinux.org
Here is the link for python package: http://www.archlinux.org/packages/extra/i686/python/
On the right side you can see link View SVN Entries - this contains PKGBUILD and other source scripts.
Now you need to find what revision of PKGBUILD contains python2.5 yet.
You will find out that the latest revision where python2.5 is used is 4684: http://repos.archlinux.org/viewvc.cgi?v … ision=4684
So download those 2 files to some dir on your disk, the use makepkg -i command, which compiles and instales package (or just compile using makepkg and then install by pacman -U name-of-package).

If you dont want pacman to update your python package, edit file /etc/pacman.conf and add this line (uncomment) IgnorePkg = python.

Last edited by EVRAMP (2008-11-08 13:50:04)

Offline

#3 2008-11-21 19:52:21

qdiesel
Member
Registered: 2008-05-19
Posts: 60

Re: Python 2.5 altinstall

I have almost the same problem but after downgrade python can't find a  lot of modules (fuse, gtk, etc).
Reinstalling them didn't solve that.

Offline

#4 2008-11-21 21:11:40

j.roszk
Member
From: Poznan/Poland
Registered: 2008-05-22
Posts: 29
Website

Re: Python 2.5 altinstall

Because these packages are now compiled against python 2.6. You have to downgrade/makepkg them as well (or have both versions installed with a bit of hacking).

Offline

#5 2008-11-21 21:25:49

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Python 2.5 altinstall

Um, no.

http://bbs.archlinux.org/viewtopic.php?id=46887

If it's a repo package, file a bug, don't just downgrade blindly as you're just going to cause yourself further problems.

Offline

#6 2008-11-22 13:28:07

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: Python 2.5 altinstall

Also python25 is in AUR

Offline

#7 2008-11-22 20:53:24

qdiesel
Member
Registered: 2008-05-19
Posts: 60

Re: Python 2.5 altinstall

Daenyth wrote:

python25 is in AUR

But how can I make it use installed modules? Do I really need to duplicate them?

Offline

#8 2008-11-22 22:39:55

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: Python 2.5 altinstall

if the binaries for a python module were compiled against Python 2.6 (if so, they'll end up in the /usr/lib/python2.6/site-packages/ directory), then yes, if you want to use them with a Python 2.5 install, you'll need to rebuild them (making sure that the python interpreter that gets called when rebuilding is your Python 2.5). Some binaries don't need to be updated for Python 2.6, so they're staying in the python2.5 site-packages directory for now. That directory is in the path that Python 2.6 uses to search for modules (at least, this is so on the standard Arch install of Python 2.6), so it will find them.

A probable problem: the python2.5 site-packages directory PRECEDES the python2.6 site-packages directory in Python 2.6's sys.path. So if you do have two installations of a given module on your system, one in each of python2.5/site-packages and python2.6/site-packages, the 2.5 version will get found first. You'll need to adjust the Python 2.6 sys.path to work around that.

Offline

#9 2008-12-26 02:08:32

compengi
Member
Registered: 2008-11-04
Posts: 9

Re: Python 2.5 altinstall

How do you want me to file a bug that's caused by improper support for the new package? I believe rolling up releases aren't just to upgrade to the latest software, but also to insure that after this upgrade nothing would break or cause incompatibility for other packages. And this is vital for major packages that others depend on. Upgrading minor packages is not a problem, but what concerns the major ones, I think that you should first release them for testing purpose only and not pushing users into problems. After you make sure no issues with people that tested it, then you can release it. I'm highlighting both the newest Python 2.6 upgrade as well as the new Xorg with hotplugin, which I believe they were the worst upgrades I've ever remembered using this distro.

Offline

#10 2008-12-26 02:23:28

Allan
Developer
From: Brisbane, AU
Registered: 2007-06-09
Posts: 9,939
Website

Re: Python 2.5 altinstall

Python did sit in [testing] for a while, and the Xorg sat in [testing] for six months!  Note, no bug reports remained open for either package when it was moved to [extra].

What is broken for python-2.6?  I can't fix things if no-one tell me...

Offline

#11 2008-12-27 20:38:19

compengi
Member
Registered: 2008-11-04
Posts: 9

Re: Python 2.5 altinstall

I run supybot for one of ubuntu's communities and this package has a broken code with the latest python version. I contacted the project's developer and asked if anytime soon this could be fixed, he replied that he won't fix untill the major distros or debian unstable/experimental would update their python packages. And contacting debian developers didn't help either, as they believe that there is still much more to fix in 2.5. And here I got stuck. Altinstalling to python2.5 didn't work, as some plugins fail to load. I also run 'mailman' which broke also after the update.

Offline

#12 2008-12-28 01:57:39

Allan
Developer
From: Brisbane, AU
Registered: 2007-06-09
Posts: 9,939
Website

Re: Python 2.5 altinstall

Mailman is fixed.

For supybot, you need to install a python2.5 package and install python2.5 versions of the needed modules.  Adjusting the PKGBUILDs to do this is fairly straight forward.

Offline

#13 2008-12-28 05:49:49

compengi
Member
Registered: 2008-11-04
Posts: 9

Re: Python 2.5 altinstall

That's what I directly did, but everytime I load the plugin, it says "Error: No module named sqlite" which is installed and I didn't touch anything regarding this. Any solutions?

Offline

#14 2008-12-28 06:01:45

Allan
Developer
From: Brisbane, AU
Registered: 2007-06-09
Posts: 9,939
Website

Re: Python 2.5 altinstall

Take the PKGBUILD for python-pysqlite from ABS and modify

python setup.py install --root=$startdir/pkg

to

python2.5 setup.py install --root=$startdir/pkg

and build and install.

Change the pkgname if you want the 2.6 version to be installed as well.

Offline

#15 2008-12-28 06:13:00

Allan
Developer
From: Brisbane, AU
Registered: 2007-06-09
Posts: 9,939
Website

Re: Python 2.5 altinstall

Thinking on this, I would try building the modules for python2.4 from the repos.  This will avoind any conflicts due python-2.6 having the 2.5 path in its search path

Offline

#16 2008-12-28 06:39:03

compengi
Member
Registered: 2008-11-04
Posts: 9

Re: Python 2.5 altinstall

I reinstalled python-pysqlite as you told me with this PKGBUILD:

# $Id$
# Maintainer: Aaron Griffin <aaron@archlinux.org>
# Contributor: Aaron Griffin <aaron@archlinux.org>

pkgname=python-pysqlite
pkgver=2.4.1
_branch=2.4
pkgrel=2
pkgdesc="A Python DB-API 2.0 interface for the SQLite embedded relational database engine"
license=("custom")
arch=(i686 x86_64)
url="http://initd.org/tracker/pysqlite"
depends=(python sqlite3)
replaces=(pysqlite2)
source=(http://initd.org/pub/software/pysqlite/releases/$_branch/$pkgver/pysqlite-$pkgver.tar.gz \
        setup.cfg)

md5sums=('7d9a4875a7107b94eb4aa2dc861a2537')

build() {
  cd $startdir/src/pysqlite-$pkgver
  cp $startdir/src/setup.cfg .
  python2.5 setup.py install --root=$startdir/pkg

  mkdir -p $startdir/pkg/usr/share/licenses/$pkgname
  install -m644 LICENSE $startdir/pkg/usr/share/licenses/$pkgname/license.txt

  rm -r $startdir/pkg/usr/pysqlite2-doc
}

but still it claims that no module sqlite.

Offline

#17 2008-12-28 06:50:02

Allan
Developer
From: Brisbane, AU
Registered: 2007-06-09
Posts: 9,939
Website

Re: Python 2.5 altinstall

Hmmm.... that seems to supply pysqlite2 module.  python-pysqlite-legacy (in community repo) provides the old sqlite module.  Try doing the same for that.

Offline

#18 2008-12-28 07:06:58

compengi
Member
Registered: 2008-11-04
Posts: 9

Re: Python 2.5 altinstall

That works, thank you alot!

Offline

#19 2009-01-01 06:44:12

smartcat99s
Member
Registered: 2006-03-17
Posts: 44

Re: Python 2.5 altinstall

FYI, I tried supybot from SVN and it's working for me on python 2.6


Running Folding@Home for Team 11108 - My Stats

Offline

Board footer

Powered by FluxBB