First run
# type certbot
certbot is hashed (/usr/bin/certbot)
To find out where certbot
is installed to. Or command -v certbot
if you prefer.
Then run head /usr/bin/certbot
and note what version of Python it’s using:
#!/usr/bin/python3
In my case, it was using Python 3.
I noticed from my pip output it was trying to install a Python 2.7 package:
# pip install certbot-dns-digitalocean
Requirement already satisfied: certbot-dns-digitalocean in /usr/local/lib/python2.7/dist-packages
So how do we get pip to install Python 3 packages instead? Just copy the instructions from here:
cd /tmp
curl -O https://bootstrap.pypa.io/get-pip.py
python3 get-pip.py
rm get-pip.py
Now you should have the pip3
command, so run this instead:
pip3 install certbot-dns-digitalocean
And now try again:
# certbot plugins
Saving debug log to /var/log/letsencrypt/letsencrypt.log
-------------------------------------------------------------------------------
* dns-digitalocean
Description: Obtain certs using a DNS TXT record (if you are using DigitalOcean
for DNS).
Interfaces: IAuthenticator, IPlugin
Entry point: dns-digitalocean =
certbot_dns_digitalocean.dns_digitalocean:Authenticator