I am running a CentOS 7.2 system, and I recently used pyenv to install Python 2.7.5. I am rather new to Linux, and I was under the impression that I should use pyenv to install Python so as not to interfere with the "system Python." Before installing pyenv, yum worked perfectly.
Now, however, when I try to use yum I get the following error:
There was a problem importing one of the python modules required to run yum. The error leading to the problem was: No module named yum. Please install a package which provides this module, or verify that the module is installed correctly.
I tried following the advice from the first reply of this post. When I type find / -type f -executable -name 'python2*'
, I get the following output:
~/.pyenv/shims/python2
~/.pyenv/shims/python2.7
~/.pyenv/shims/python2.7-config
~/.pyenv/shims/python2-config
~/.pyenv/shims/versions/2.7.5/bin/python2.7
~/.pyenv/shims/versions/2.7.5/bin/python2.7-config
~/.pyenv/shims/versions/2.7.5/envs/spyderenv/bin/python2.7
/usr/bin/python2.7
/usr/bin/python2.7 should clearly be the system Python, but when I run it and type 'import yum', I get ImportError: No module named yum. (And just to cover my bases, the first line of the 'yum' file is #!/usr/bin/python, and /usr/bin/python is a link to python2, and python2 is a link to python2.7)
It seems that somehow pyenv is screwing things up, but I can't figure out how. Thanks in advance for the help.