ImportError: No module named xml.etree.ElementTree


#1

Hi everyone

just tried to use the letsencrypt client on an old suse 12.3. First try with already installed python (no idea which version). And afterwards, I even removed python and installed it via the script. Both resulted in the same error:

Any suggestions? :smile:
Thanks!

www:~/letsencrypt # ./letsencrypt-auto
Bootstrapping dependencies for openSUSE-based OSes…
Achtung: Repository ‘openSUSE-12.3-Update’ appears to be outdated. Consider using a different mirror or server.
Achtung: Repository ‘openSUSE-12.3-Update-Non-Oss’ appears to be outdated. Consider using a different mirror or server.

Creating virtual environment…
Updating letsencrypt and virtual environment dependencies…Traceback (most recent call last):
File “/root/.local/share/letsencrypt/bin/pip”, line 8, in
load_entry_point(‘pip==7.1.2’, ‘console_scripts’, ‘pip’)()
File “/root/.local/share/letsencrypt/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py”, line 318, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File “/root/.local/share/letsencrypt/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py”, line 2221, in load_entry_point
return ep.load()
File “/root/.local/share/letsencrypt/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py”, line 1954, in load
entry = import(self.module_name, globals(),globals(), [‘name’])
File “/root/.local/share/letsencrypt/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/init.py”, line 15, in
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File “/root/.local/share/letsencrypt/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/vcs/subversion.py”, line 9, in
from pip.index import Link
File “/root/.local/share/letsencrypt/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/index.py”, line 32, in
from pip._vendor import html5lib, requests, pkg_resources, six
File “/root/.local/share/letsencrypt/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/_vendor/html5lib/init.py”, line 16, in
from .html5parser import HTMLParser, parse, parseFragment
File “/root/.local/share/letsencrypt/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/_vendor/html5lib/html5parser.py”, line 6, in
from . import inputstream
File “/root/.local/share/letsencrypt/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/_vendor/html5lib/inputstream.py”, line 10, in
from . import utils
File “/root/.local/share/letsencrypt/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/_vendor/html5lib/utils.py”, line 10, in
import xml.etree.ElementTree as default_etree
ImportError: No module named xml.etree.ElementTree


#2

I had the same issue running on a suse12.1.

To fix it I installed the missing package “python-xml” with this command:
zypper install python-xml

After that I got some InsecurePlatformWarnings, which I removed by installing security pips with this command:
pip install requests[security]

After both, it ran on my machine.
I hope this helps you, too.

  • M

#3

Thank you very much!

It actually resolved my problems! Well, the insecure warnings are still there, but I do not care :smile: