I had an issue today when installing pytrainer. It wanted to install some extra python packages but it couldn’t.
The reason was that I had python2.5 v2.5.2-2ubuntu5 installed but the extra packages depended on an older version – 2.5.2-2ubuntu4.1.
I don’t know how I had ended up such a knot, but the ubuntu5 packages I had seemed like they had been obsoleted from hardy-proposed which is clearly one of my sources lists. Ho hum.
Downgrading through the GUI wasn’t intuitive, I tried to ‘force version’ but that seemed to have no effect.
The answer lies in the command line, and is explained by this forum post.
Aptitude lets you specify a version parameter over the command line, so I used sudo aptitude install python2.5=2.5.2-2ubuntu4.1 to install the older version. This then resolved what other packages needed downgrading, gave me a summary, and did the business.

