Python Import Yum Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the importerror: no module named yum workings and policies of this site About Us Learn more about Stack no module named yum redhat Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs
Python Install Yum
Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join
Ansible Importerror: No Module Named Yum
them; it only takes a minute: Sign up There was a error importing one of the Python modules up vote -1 down vote favorite I am trying to run a yum command # yum install mod-pagespeed but I am getting this error There was a problem importing one of the Python modules required to run yum. The error leading to it's possible that the above module doesn't match the current version of python this problem was: cannot import name Repository 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 (r266:84292, Feb 22 2013, 00:00:18) [GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] If you cannot solve this problem yourself, please go to the yum faq at: http://yum.baseurl.org/wiki/Faq Your help will be greatly appreciated python centos python-2.6 share|improve this question edited Sep 7 '15 at 8:40 Robbe Roels 776 asked Sep 7 '15 at 8:16 Stifboy 9017 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote Did you upgrade the Python that's running on your system? It's possible that it broke yum, as yum on older systems relied on the Python version being 2.4 Can you downgrade python back to 2.4 to get yum working again, then do an alternate install of Python to a newer version, keeping both on your system? See this link for procedures for installing alternate versions of python: https://github.com/h2oai/h2o-2/wiki/Installing-python-2.7-on-centos-6.3.-Follow-this-s
Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the
Yum No Module Named Rpm
workings and policies of this site About Us Learn more about Stack python yum module documentation Overflow the company Business Learn more about hiring developers or posting ads with us Server Fault Questions Tags no module named yum rhel 6 Users Badges Unanswered Ask Question _ Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute: Sign up Here's how http://stackoverflow.com/questions/32434000/there-was-a-error-importing-one-of-the-python-modules it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top How to fix yum error: No module named CElementTree? up vote 1 down vote favorite I've the following problem with yum: $ yum There was a problem importing one of the Python modules required to run yum. The error leading http://serverfault.com/questions/472960/how-to-fix-yum-error-no-module-named-celementtree to this problem was: No module named cElementTree 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.4.3 (#1, Feb 22 2012, 16:06:13) [GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] If you cannot solve this problem yourself, please go to the yum faq at: http://wiki.linux.duke.edu/YumFaq My OS: CentOS release 5.8 (Final) When trying to install python-elementtree manually from RPM package, it gives the following error: $ sudo rpm -i http://mirror.centos.org/centos-5/5/os/i386/CentOS/python-elementtree-1.2.6-5.i386.rpm package python-elementtree-1.2.6-7.el4.rf.i386 (which is newer than python-elementtree-1.2.6-5.i386) is already installed $ sudo rpm -i http://mirror.centos.org/centos-5/5/os/i386/CentOS/python-elementtree-1.2.6-5.i386.rpm Related links: http://www.rickrodriguezjr.com/wordpress/archives/183 http://www.webhostingtalk.com/showthread.php?t=936132 http://www.clearfoundation.com/component/option,com_kunena/Itemid,232/catid,26/func,view/id,45278/ http://pingd.org/2012/no-module-named-celementtree-yum-update-error.html http://forums.contribs.org/index.php?topic=49189.0 http://www.centos.org/modules/newbb/viewtopic.php?topic_id=3401 centos python yum share|improve this question edited Mar 29 '15 at 15:38 asked Jan 28 '13 at 9:27 kenorb 1,2261229 add a comment| 2 Answers 2 active oldest votes up vote 1 down vote Hmm, is python-elementtree still installed? The cEleementTree module should live in /usr/lib64/python2.4/site-packages/cElementTree.so (/usr/lib/... on 32bit systems). Does that file still exist? If the package is missing, you can resintall it
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting http://superuser.com/questions/661983/no-module-named-yum-after-yum-update ads with us Super User Questions Tags Users Badges Unanswered Ask Question _ Super User is https://www.redhat.com/archives/rhl-list/2007-January/msg04575.html a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top No module named yum after “yum update” up vote 2 down vote favorite 2 Amazon EC2 Linux AMI Python 2.7.5 yum 3.4.3 I no module recently did a "yum update" and I'm guessing this lead to my issues. Yum now does this: # 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.7.5 (default, Sep 3 2013, 23:16:48) [GCC 4.6.3 no module named 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 Looked at the yum faq and wasn't super comfortable with messing with yum rpms and messing things up more. Googled a bit and found out that python 2.6 has the right site packages and 2.7.5 does not: # rpm -ql python | grep "site-packages$" # rpm -ql yum | grep "site-packages/yum$" /usr/lib/python2.6/site-packages/yum If I try and force yum to use 2.6 I now get this error: # yum --version 3.4.3 CRITICAL:yum.cli:Config Error: Error accessing file for config file:///etc/yum/yum.conf Not sure how to get back up and running ... python amazon-ec2 yum redhat-enterprise-linux share|improve this question edited Sep 17 at 20:35 fixer1234 11.2k122949 asked Oct 18 '13 at 20:18 drfence 121117 What are the permissions of the file /etc/yum/yum.conf? –Ruben Roy Oct 18 '13 at 20:59 1 Does the file exist? Usually the yum config file is at /etc/yum.conf. Can you symlink this file to /etc/yum/yum.conf if it doesnt exist? –Ruben Roy Oct 18 '13 at 21:05 @RubenRoy right after I posted this I tried that and it fixed it. I thought the problem would be MUCH more complex than this. –drfence Oct 19 '13 at 2:20 add a comment| 2 Answers 2 active oldest votes up vote 4 down vote In centos, Mostly this problem is happened due to the cause of 2 versions of python are being installed in the same machine
work Date: Tue, 30 Jan 2007 18:41:09 -0300 thanks, but this didn't solve it and yum is still broken. [root localhost rpm]# rpm -Uvh rpm-python-4.4.2-32.i386.rpm Preparing... ########################################### [100%] package rpm-python-4.4.2-32 is already installed rpm-python*, not python-rpm* appears to be already installed. Perhaps they are the same, I don't know. I have re-built Python2.5 from tar source but I get "No module named yum." [root localhost rpm]# 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.5 (r25:51908, Jan 30 2007, 16:15:17) [GCC 4.1.1 20070105 (Red Hat 4.1.1-51)] If you cannot solve this problem yourself, please go to the yum faq at: http://wiki.linux.duke.edu/YumFaq ----And---- [root localhost rpm]# python Python 2.5 (r25:51908, Jan 30 2007, 16:15:17) [GCC 4.1.1 20070105 (Red Hat 4.1.1-51)] on linux2 Type "help", "copyright", "credits" or "license" for more information. import yum Traceback (most recent call last): File "