Background:
Given the background, how do you install a newer version of python and keep the older python version?
I have downloaded from python.org the "install from source" *.tgz package. The readme is pretty simple and says "execute three commands: ./configure; make; make test; sudo make install;"
If I do the above commands, will the installation overwrite the old version of python I have (I definitely need the old version)?
When you install from source, by default, the installation goes in /usr/local
-- the executable in particular becomes /usr/local/bin/pythonX.Y
with a symlink to it that's named /usr/local/python
. Ubuntu's own installation is in /usr/
(e.g., /usr/bin/python
), so the new installation won't overwrite it. Take care that the PATH
environment variable doesn't have /usr/local/bin
before /usr/bin
, or else simple mentions of python
would execute the new one, not the old one.