Skip to content

Posts tagged ‘Python’

CentOS5 – yum – cElementTree – Python

So you updated using yum, and lo and behold yum is no longer working. An attempt to use yum gives you the following:


$ 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 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, Jul 27 2009, 17:57:39)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)]

If you cannot solve this problem yourself, please go to
the yum faq at:
http://wiki.linux.duke.edu/YumFaq

I had this error on a CentOS5 VPS. Now, the fix for this is simple enough. It involves removal of some packages, then re-installing those packages we removed.


rpm -e yum yum-fastestmirror python-urlgrabber python-sqlite python-elementtree
wget http://mirror.centos.org/centos/5/os/i386/CentOS/yum-3.2.22-20.el5.cento...
wget http://mirror.centos.org/centos/5/os/i386/CentOS/yum-fastestmirror-1.1.1...
wget http://mirror.centos.org/centos/5/os/i386/CentOS/python-urlgrabber-3.1.0...
wget http://mirror.centos.org/centos/5/os/i386/CentOS/python-sqlite-1.1.7-1.2...
wget http://mirror.centos.org/centos/5/os/i386/CentOS/python-elementtree-1.2....
rpm -i yum-3.2.22-20.el5.centos.noarch.rpm yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm python-urlgrabber-3.1.0-5.el5.noarch.rpm python-sqlite-1.1.7-1.2.1.i386.rpm python-elementtree-1.2.6-5.i386.rpm

Of course bear in mind the architecture and versions (depends when you are reading this post!) of the files.

This should get you up and running again.

Python receives Linux New Media Award

Python has received the Linux New Media Award in the category Best Open Source Programming Language.

Knoppix inventor Klaus Knopper handed over the Best Open Source Programming Language prize, this year hotly disputed among the jury. The distinction went to Python. “The thing can do anything,” Knopper expressed. Martin von Löwis of the Python Foundation accepted the award for the Python community.