Python Error after fresh install

Used Certbot historically on many other servers without issue, but after trying to install on one of our Ubuntu 16.04 servers, ran into a really strange issue:

I followed the steps found here exactly:

But after running “sudo ./certbot --nginx certonly”, I get the following stack trace:

~$ sudo certbot --nginx certonly
Traceback (most recent call last):
File “/usr/bin/certbot”, line 11, in
load_entry_point(‘certbot==0.14.2’, ‘console_scripts’, ‘certbot’)()
File “/usr/lib/python2.7/dist-packages/pkg_resources/”, line 561, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File “/usr/lib/python2.7/dist-packages/pkg_resources/”, line 2631, in load_entry_point
return ep.load()
File “/usr/lib/python2.7/dist-packages/pkg_resources/”, line 2291, in load
return self.resolve()
File “/usr/lib/python2.7/dist-packages/pkg_resources/”, line 2297, in resolve
module = import(self.module_name, fromlist=[‘name’], level=0)
File “/usr/lib/python2.7/dist-packages/certbot/”, line 7, in
import zope.component
File “/usr/lib/python2.7/dist-packages/zope/component/”, line 21, in
from zope.component.interfaces import ComponentLookupError
File “/usr/lib/python2.7/dist-packages/zope/component/”, line 21, in
from zope.interface.interfaces import ComponentLookupError
ImportError: cannot import name ComponentLookupError

Any idea why this is happening? The server I’m running it on is an older ubuntu server running some dedicated python 2.7 scripts.

Ok, solved my own problem after some deep digging and a guess:

sudo pip install zope.interface --upgrade

This upgraded zope.interface package to 3.6.1 (which the certbot package isn’t currently configured for).

After this manual step, certbot worked as expected.

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