Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How to update python(2.4) to python 2.6 in redhat linux terminal?

I tried sudo apt-get install python2.6 but returned sudo: apt-get: command not found , I am new to linux, any help would be appreciated!

share|improve this question
2  
What distribution of Linux are you using? –  Joseph Sep 12 '12 at 14:20
    
what linux disto do you use? –  muffinmad Sep 12 '12 at 14:20
    
@Joseph: Red Hat Enterprise Linux Server –  nihulus Sep 13 '12 at 6:24
add comment

migrated from stackoverflow.com Sep 12 '12 at 16:15

This question came from our site for professional and enthusiast programmers.

2 Answers

up vote 0 down vote accepted

First of all, you are off topic here. There is a sister site about Linux administration.

The exact way of upgrading python depends on the particular Linux version that you have.

apt-get only works on Debian and Ubuntu Linux. On SuSE, you can try yast. Fedora has a package manager called yum I believe.

Details should be in the documentation of your Linux distribution.

Some Linux distributions may even have multiple python versions installed at the same time.

Try running python2.6, maybe it is already installed.

share|improve this answer
    
thanks for the reply! I managade to install python2.7, but python -V still shows python 2.4.3...? –  nihulus Sep 13 '12 at 8:03
    
Your default python the probably still is python 2.4 - this is not bad, as some application might expect it to be that way. Try running python2.7 if you want python 2.7 –  Anony-Mousse Sep 13 '12 at 8:05
add comment

I think you'd better install a new version of python in your own dir instead updating the default in the /usr/bin/

for example, you can download the source from official website, then compile and install it in your own dir such as /home/usrname/python. then edit the bashrc to add it to the PATH.

share|improve this answer
    
I have multiple pythons ( in debian ) with names like /usr/bin/python2-6. –  richard Sep 12 '12 at 16:54
    
No, that is not a good idea. Because you do not get automatic security updates anymore. Stick to the distribution version. –  Anony-Mousse Sep 12 '12 at 18:16
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.