Come installare Python 2.6 su Precise Pangolin

La nuova Release di Ubuntu (Precise Pangolin, 12.04), ha rimosso il supporto a Python2.6 in favore di Python2.7.

Al momento non ci sono PPA dedicati all'installazione di Python2.6 per questa release.

Se volete installare una versione pacchettizzata di Python2.6 potete usare questo script (ispirato da questo thread) ovviamente a vostro rischio e pericolo ®  :) :

#!/bin/bash
# Customize the country variable to reach closer mirrors, e.g. set it to:
# us, uk, de, fr, es, ...
COUNTRY=it
BASEURL=http://$COUNTRY.archive.ubuntu.com/ubuntu/pool/main/p/python2.6

# Create a temporary folder and go into it
DOWNLOADDIR=$( mktemp -d )
cd $DOWNLOADDIR

# Download the packages
wget $BASEURL/python2.6_2.6.7-4ubuntu1_i386.deb
wget $BASEURL/python2.6-minimal_2.6.7-4ubuntu1_i386.deb
wget $BASEURL/python2.6-dev_2.6.7-4ubuntu1_i386.deb
wget $BASEURL/libpython2.6_2.6.7-4ubuntu1_i386.deb
# if you need the debug build of the Python Interpreter
# uncomment the following line
#wget $BASEURL/python2.6-dbg_2.6.7-4ubuntu1_i386.deb

# install the packages
dpkg -i *python2.6*_2.6.7-4ubuntu1_i386.deb

# Remove unwanted stuff
rm -ri $DOWNLOADDIR

Se per caso volete rimuovere i pacchetti potete usare dpkg -r:
root@padme:~# dpkg -r python2.6-dbg
(Reading database ... 232399 files and directories currently installed.)
Removing python2.6-dbg ...
Processing triggers for man-db ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

Spero di essere stato utile :)

Nessun commento: