Python errors. Current one is "ImportError: No module named urllib"


#1

I’ve installed letsencrypt on my Ubuntu 16.04 server by using Certbot. The installation completes succesfully, but I get some errors when I try to run it.

This is the current trace:

Traceback (most recent call last):
File “/usr/bin/letsencrypt”, line 9, in
load_entry_point(‘letsencrypt==0.4.1’, ‘console_scripts’, ‘letsencrypt’)()
File “/usr/lib/python2.7/dist-packages/pkg_resources/init.py”, line 542, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File “/usr/lib/python2.7/dist-packages/pkg_resources/init.py”, line 2569, in load_entry_point
return ep.load()
File “/usr/lib/python2.7/dist-packages/pkg_resources/init.py”, line 2229, in load
return self.resolve()
File “/usr/lib/python2.7/dist-packages/pkg_resources/init.py”, line 2235, in resolve
module = import(self.module_name, fromlist=[‘name’], level=0)
File “/usr/lib/python2.7/dist-packages/letsencrypt/cli.py”, line 32, in
from letsencrypt import configuration
File “/usr/lib/python2.7/dist-packages/letsencrypt/configuration.py”, line 5, in
from six.moves.urllib import parse # pylint: disable=import-error
ImportError: No module named urllib

Before installing this version I was running some older version I cloned from i git repo. I used to run a command named letsencrypt-auto. Don’t know if I should have done some kind of uninstallation procedure?

Anyway, any help would be very much appreciated :slight_smile:


#2

“By using certbot”? Didn’t you use apt?

Anywayz, I can’t find why urllib isn’t among the dependencies for the Ubuntu package(s), but installing python-urllib3 would, I think, do the trick. Hmm, on my system (Gentoo, not Ubuntu), urllib seems to be part of the Python package itself… And not the urllib3 package…?


#3

Yes I used apt. I meant using certbot as in running the commands “it” told me to :wink:

I have tried reinstalling urllib3.

The first error I got was related to python-six. To get around that one I had to do “sudo pip2 uninstall six” (or something like that. typing from memory…)


#4

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.