No module named certbot.main

My operating system is (include version):

Debian GNU/Linux 9.9 (stretch)

I installed Certbot with (certbot-auto, OS package manager, pip, etc):

apt-get install certbot -t stretch-backports

I ran this command and it produced this output:

certbot certonly or certbot --version

Traceback (most recent call last):
File “/usr/local/bin/certbot”, line 7, in
from certbot.main import main
ImportError: No module named certbot.main

Certbot’s behavior differed from what I expected because:

it shouldn’t output this error

Python version in use :

Python 2.7.13

I think you might have two conflicting installations of certbot. I think the debian packages would not have installed to /usr/local/bin - did you by chance make multiple attempts at installing certbot?

Will you please post the output of:
dpkg-query -L certbot | grep bin

1 Like

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