How to update python version in linux terminal

24,476

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:
24,476

Related videos on Youtube

jhon keeth
Author by

jhon keeth

Updated on September 18, 2022

Comments

  • jhon keeth
    jhon keeth over 1 year

    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!

    • gallardoelise2
      gallardoelise2 over 11 years
      What distribution of Linux are you using?
    • Admin
      Admin over 11 years
      what linux disto do you use?
    • jhon keeth
      jhon keeth over 11 years
      @Joseph: Red Hat Enterprise Linux Server
  • Has QUIT--Anony-Mousse
    Has QUIT--Anony-Mousse over 11 years
    No, that is not a good idea. Because you do not get automatic security updates anymore. Stick to the distribution version.
  • jhon keeth
    jhon keeth over 11 years
    thanks for the reply! I managade to install python2.7, but python -V still shows python 2.4.3...?
  • Has QUIT--Anony-Mousse
    Has QUIT--Anony-Mousse over 11 years
    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