I have installed Ubuntu 12.10 on my laptop, now i want to use Python 2.5.4 for educational purpose. Can any one help me with step by step instructions... I also need IDLE for 2.5.4.
-
12.5.4? Why? "Python 2.5.4 has been replaced by a newer bugfix release of Python" Should that not be 2.5.6 according to: python.org/download/releases/2.5.4– RinzwindOct 22, 2012 at 8:10
-
Please create a new question for idle. AU works best with 1 question and 1 valid answer.– RinzwindOct 22, 2012 at 8:19
2 Answers
I use https://launchpad.net/~fkrull/+archive/deadsnakes for all the old python versions.
It seems maintained and new versions are also added.
simply do the following:
sudo apt-add-repository ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-get install python2.5
-
-
This and virtualenv's has saved me enourmous ammounts of hassle ;) Oct 22, 2012 at 9:01
-
This method does install 2.5.6 btw. I got distracted by the question asking for 2.5.4...– RinzwindOct 22, 2012 at 9:07
This will install 2.5.4 from source:
sudo apt-get install build-essential gcc
cd Downloads
wget https://www.python.org/ftp/python/2.5.4/Python-2.5.4.tgz
tar -xvzf Python-2.5.4.tgz
cd Python-2.5.4
./configure --prefix=/usr/local/python2.5
make
make test
sudo checkinstall --pkgname python2.5 --provides python2.5
NOTE: if compiling was halted with error from Modules/getbuildinfo.o
and Modules/getbuildinfo.c
---> redo the configure command like this SVNVERSION=not-found ./configure --prefix=[your/path/preference]
If you want to replace your standard python:
sudo ln -s /usr/local/python2.5/bin/python /usr/bin/python2.5 </pre>
You can use this version by issuing python2.5
instead of python
.
-
Can you explain what the
checkinstall
command does? Seems likemake install
is the normal thing to do.– mlissnerAug 12, 2014 at 18:11 -
see help.ubuntu.com/community/CheckInstall It IS
make install
+ extras.– RinzwindAug 12, 2014 at 18:40 -
On modern systems, this produces a Python unable to run hashlib (if any, on many system the build will just crash). Here is my minimal fork of Python 2.5 that builds in 2016 on debian sid: github.com/phihag/python2.5 .– phihagNov 9, 2016 at 21:25