2

I am trying to work with certbot and when I put certbot -v (Or any certbot command) I get this:

Traceback (most recent call last):
  File "/usr/local/bin/certbot", line 6, in <module>
    from pkg_resources import load_entry_point
ModuleNotFoundError: No module named 'pkg_resources'

Ok... I uninstall python. installed python3. I installed setuptools and see it in /usr/local/lib/python3.8/dist-packages

It happened after I updated my ubuntu to 20.04 I tried all the suggestions and nothing works. How can I solve this?

Henri
  • 983
  • 3
  • 11
  • 29
  • I believe you're on the right track that it means there's a problem with your python environment and it's related to `setuptools` because typically `pkg_resources` is distributed with `setuptools`. Please check this answer and see if it has anything useful for you. https://stackoverflow.com/questions/7446187/no-module-named-pkg-resources – Mike Martin Jun 04 '21 at 02:59
  • Thanks Mike. I did try all the suggestions but didn't work for me. I found a workaround though. – Henri Jun 04 '21 at 03:11

1 Answers1

0

So...what worked for me is actually that:

curl -o- https://raw.githubusercontent.com/vinyll/certbot-install/master/install.sh | bash

Since I have Ubuntu 20.04 certibot is kind of touchy. This command installed python packages properly.

Many thanks

Henri
  • 983
  • 3
  • 11
  • 29