How to fix certbot ContextualVersionConflict: zope.interface 4.7.1, Requirement.parse('zope.interface>=5.3.0a1')

Problem:

While running certbot , you see an error message like the following one:

An unexpected error occurred:
pkg_resources.ContextualVersionConflict: (zope.interface 4.7.1 (/usr/lib/python3/dist-packages), Requirement.parse('zope.interface>=5.3.0a1'), {'zope.component'})

Solution

Your installed version of zope.interface is too old. Upgrade it using

sudo pip3 install --upgrade zope.interface

After that, certbot should work fine.