as a normal user run the following commands:
wget http://www.python.org/ftp/python/2.7/Python-2.7.tgz
tar xzf Python-2.7.tgz
cd Python-2.7
./configure --with-pth --with-dec-threads --with-signal-module --prefix=/opt/python-2.7
make
then as root do (becoming root using sudo
or su
):
make install
A brief explanation:
wget
downloads the python sources, you can install another version if you like, maybe python 3.x
tar
uncompress the downloaded file
configure
checks if all required dependances are available and configures the source code for your own system
make
starts the compiling/linking process
make install
copy the compiled file in the right place
after that maybe you need to make a symbolic link to your python executable or to your python folders, it depends on you
references:
- the installations commands have been copy-pasted from this website after a rapid google search, so maybe you need different config options
- the official info are here
note:
I this question should be better placed on superuser.com (the reason is that may be more relevant for computer enthusiasts & power users rather than for programmers, since it is not a programming issue but a software installation issue)