root@vps434142:~# certbot
Traceback (most recent call last):
File "/usr/bin/certbot", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3017, in <module>
@_call_aside
File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3003, in _call_aside
f(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3030, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 659, in _build_master
ws.require(__requires__)
File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 967, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 853, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'certbot==0.28.0' distribution was not found and is required by the application
Please note that the information you have given is very scarce and I am guessing here. Nevertheless I will try to help you.
Based on your answer(python 3.5) I am guessing that you are on debian stretch and not buster.
I would try to reinstall python3 and certbot and see if that helps:
If that doesn't help, you could try to install certbot via pip:
I have on server python from "box" - 2.7 + 3.5, then I installed Python 3.7 for some project and than had error like you. Than i edited /usr/bin/certbot and change first line to
#!/usr/bin/python3.5
This is helped me.
Idea - apt installs Certbot and python3-certbot install packages for 3.5, but actual version python3 is python3.7 not 3.5