I expect to be able to use Python 2.6.6. with CentOS 7.3. If that is not a reasonable expectation, please say so. My goal is to use an .so file associated with Python 2.6.6. I downgraded Python from 2.7.5 to 2.6.6 on CentOS 7.3.

When I try to run yum commands, I get this error:

There was a problem importing one of the Python modules required to run yum. The error leading to this problem was: No module named yum Please install a package which provides this module or verify that the module is installed correctly. It's possible that the above module doesn't match the current version of Python, which is 2.6.6.

I did not expect this. To solve the problem I downloaded an .rpm for CentOS to install yum. I downloaded its dependencies too (including python-sqlite and python(abi)). When I try to install these with this command "rpm -ivh *.rpm --force" I get this:

Failed dependencies: db4 < 5 is obsoleted by (installed) libdb-5.3.21-19.el7.x86_64

I did not expect this error above. I cannot uninstall libdb-5.3 because RPM would not work. I need db4-4...rpm because it is a dependency of python-libs-2.6.6. I need python-libs-2.6.6 to get Python 2.6.6 fully funcational for the .so file I need that is associated with Python 2.6.6.

What should I do?

  • If you can get the original 2.7.5 working again, I think you can install 2.6.6 along side it, without affecting the version that is needed by yum etc..
    – Guy
    Commented Dec 24, 2016 at 0:12

1 Answer 1


You should revert to the version of Python that came with CentOS 7.3. Too many system scripts depend on the Python version that came with the OS for you to be able to safely downgrade to Python 2.6.6

You can download a Python 2.6.6 compressed tarball from python.com and install it wherever you like if you really need to use this version for a particular application.

  • I tried installing Python 2.6.6. The original version of Python remained. Can you clarify that you recommend not downgrading but installing Python 2.6.6 too? It seems like a contradiction. The application is something I have little control of. A different system user runs and performs scripted operations that I cannot modify or customize.
    – Kiran
    Commented Dec 24, 2016 at 0:21
  • @Kiran, You can not downgrade python 2.7.5 because it was default python from centos 7.x. My python on centos/SL 7.2 was python-2.7.5-34.el7.x86_64.When you really needed python 2.6.6. Maybe you should downgrade centos 7.x to centos 6.x.Or you want to try install python 2.6 manually. You can download it from rpm.pbone.net
    – supriady
    Commented Dec 24, 2016 at 5:15
  • @Kiran. Yes, that is what I mean. It is perfectly acceptable to have multiple versions of Python installed.
    – fpmurphy
    Commented Dec 26, 2016 at 8:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .