ImportError: No module named yum (Fedora 16) [closed]

asked 2016-01-04 09:57:05 -0500

jlwing gravatar image

Hi,

Thank you for taking the time to read my post.

I cannot import yum on any of the versions of python I have on my machine after I accedentaly deleted python from my machine.

root [ / ]# yum
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.7 (r267:88850, Nov 30 2015, 17:59:56) 
[GCC 4.6.3 20120306 (Red Hat 4.6.3-2)]

If you cannot solve this problem yourself, please go to 
the yum faq at:
  http://yum.baseurl.org/wiki/Faq


root [ / ]#

I think I might have deleted the python with the yum module or broken something that allows the yum module import.

root [ / ]# python
Python 2.7.11 (default, Jan  4 2016, 15:27:01) 
[GCC 4.6.3 20120306 (Red Hat 4.6.3-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import yum
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named yum
>>> 
root [ / ]# cd /usr/local/bin
root [ /usr/local/bin ]# ls
2to3     idle   python   python2.6         python2.7      python2.7-config  python-config  wmctrl
doxygen  pydoc  python2  python2.6-config  Python-2.7.10  python2-config    smtpd.py
root [ /usr/local/bin ]# python2.6
Python 2.6.7 (r267:88850, Nov 30 2015, 17:59:56) 
[GCC 4.6.3 20120306 (Red Hat 4.6.3-2)] on linux3
Type "help", "copyright", "credits" or "license" for more information.
>>> import yum
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named yum
>>>

I have managed to gather the following information:

root [ ~/Downloads/Python-2.7.11 ]# rpm -qa | grep yum
yum-metadata-parser-1.1.4-5.fc16.i686
yum-langpacks-0.2.4-2.fc16.noarch
yum-presto-0.7.1-1.fc16.noarch
yum-plugin-auto-update-debug-info-1.1.31-2.fc16.noarch
yum-3.4.3-25.fc16.noarch
yum-utils-1.1.31-2.fc16.noarch
root [ ~/Downloads/Python-2.7.11 ]# rpm -qa | grep python
python-mako-0.4.2-1.fc16.noarch
python-devel-2.7.3-4.fc16.i686
cracklib-python-2.8.18-2.fc15.i686
python-iniparse-0.4-3.fc15.noarch
gamin-python-0.1.10-10.fc16.i686
gstreamer-python-devel-0.10.19-2.fc15.i686
boost-python-1.47.0-7.fc16.i686
plasma-scriptengine-python-4.8.5-3.fc16.i686
python-slip-gtk-0.2.24-1.fc16.noarch
libxml2-python-2.7.8-8.fc16.i686
python-telepathy-0.15.19-3.fc16.noarch
eekboard-python-1.0.5-1.fc16.i686
gnome-python2-2.28.1-7.fc16.i686
gstreamer-rtsp-python-0.10.8-1.fc16.i686
gnome-python2-gnomevfs-2.28.1-7.fc16.i686
python-IPy-0.75-1.fc16.noarch
python-lockfile-0.9.1-1.fc16.noarch
gnome-python2-desktop-2.32.0-5.fc16.i686
python-libs-2.7.3-4.fc16.i686
rpm-python-4.9.1.3-1.fc16.i686
python-urlgrabber-3.9.1-10.fc15.noarch
python-crypto-2.3-6.fc16.i686
python-beaker-1.5.4-1.fc16.noarch
gnome-python2-gconf-2.28.1-7.fc16.i686
newt-python-0.52.14-1.fc16.i686
python-qpid-0.18-1.fc16.noarch
python-imaging-1.1.7-4.fc16.i686
opencv-python-2.3.1-3.fc16.i686
python-nose-1.1.2-1.fc16.noarch
notify-python-0.1.1-18 ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by davidva
close date 2016-07-19 16:11:20.608605

Comments

Fedora 16 is out of support, we currently support Fedora 22 and 23 so please do upgrade. If you deleted python then yum and other programs in your machine will not be able to work as they use python as main language to run. You only hope will be to restored it.

aeperezt gravatar imageaeperezt ( 2016-01-04 10:21:42 -0500 )edit