間違えてOSのパッケージリポジトリからcertbotを入れてしまった.
コマンド
sudo certbot --nginx
エラー1(初期状態)
ImportError: cannot import name 'constants'
エラー2(pip3 uninstall certbot
の後)
AttributeError: module 'acme.challenges' has no attribute 'TLSSNI01Response'
sudo pip3 uninstall certbot acme
sudo apt purge certbot python-certbot-nginx
# HERE: register official ppa repository (see official guide)
sudo apt install certbot python-certbot-nginx