Certbot gives me ImportError: cannot import name constants

Hi, I’d really appreciate any help with the following:

Am using CentOS Linux 7
Domain: clefrance.co.uk
nginx version: nginx/1.12.2
I have sudo shell access

All attempts to run certbot give:An unexpected error occurred:
ImportError: cannot import name constants

2020-07-16 12:20:46,206:DEBUG:certbot._internal.log:Exiting abnormally:
Traceback (most recent call last):
File “/usr/bin/certbot”, line 9, in
load_entry_point(‘certbot==1.3.0’, ‘console_scripts’, ‘certbot’)()
File “/usr/lib/python2.7/site-packages/certbot/main.py”, line 15, in main
return internal_main.main(cli_args)
File “/usr/lib/python2.7/site-packages/certbot/_internal/main.py”, line 1317, in main
plugins = plugins_disco.PluginsRegistry.find_all()
File “/usr/lib/python2.7/site-packages/certbot/_internal/plugins/disco.py”, line 210, in find_all
plugin_ep = PluginEntryPoint(entry_point)
File “/usr/lib/python2.7/site-packages/certbot/_internal/plugins/disco.py”, line 54, in init
self.plugin_cls = entry_point.load()
File “/usr/lib/python2.7/site-packages/pkg_resources.py”, line 2260, in load
entry = import(self.module_name, globals(),globals(), [‘name’])
File “/usr/lib/python2.7/site-packages/certbot_nginx/configurator.py”, line 17, in
from certbot import constants as core_constants
ImportError: cannot import name constants
2020-07-16 12:20:46,206:ERROR:certbot._internal.log:An unexpected error occurred:

Thanks!

This kind of error usually happens as a result of trying to install Certbot from multiple different sources, and ending up with a mix of package versions.

Where you did install Certbot from?

Thanks for the reply az.

I do not know because my usual server guy has disappeared. But if it helps, running ‘whereis certbot’ gives me a single loction: /usr/bin/certbot

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