Search code examples
pythonlinuxcentos7python-2.6epel

How can I Install Python 2.6 in CentOs 7?


I Tried to install Python 2.6 in CentOs 7 with

sudo yum install python26

But, getting the following error.

Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: centos.excellmedia.net * epel: kartolo.sby.datautama.net.id * extras: centos.excellmedia.net * updates: centos.excellmedia.net No package python26 available. Error: Nothing to do

I am also installed epel-release(sudo yum install epel-release) in CentOS 7. But, still the error is not resolved. Please help me.


Solution

  • You need to install the RPM with the following command first:

    rpm -Uvh https://archive.fedoraproject.org/pub/archive/epel/5/x86_64/python26-2.6.8-2.el5.x86_64.rpm
    

    Then you can install it:

    sudo yum install python26
    

    Note that the newest version of EPEL doesn't support python26 anymore, so you have to install it from the archive.