Dag Dag -5 years ago 159
Linux Question

On linux SUSE or RedHat, how do I load Python 2.7

Can someone provide the steps needed to install python version 2.7 on SUSE and RedHat? It version that is on there is like 2.4 and I need to have it at at least 2.6 to make my script work.
So after the install, I can type Python in a xTerm and get the Python 2.7 command line interface.

Answer Source



Download source and install from source.

NOTE: You should check for the latest version of python 2.7.x. (Originally had wget http://www.python.org/ftp/python/2.7/Python-2.7.tgz), while now the latest version is 2.7.3

wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz # Download
tar xvfz Python-2.7.3.tgz # unzip
cd Python-2.7.3 # go into directory
make # build
su # or 'sudo su' if there is no root user
make altinstall

(EDIT: make install -> make altinstall per Ignacio's comment).

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download