Categories
Technical

SSL ImportError: No module named cryptography

Problem – Let’s Encrypt

[[email protected]3-203 ec2-user]# /usr/local/bin/certbot-auto --no-bootstrap
 Creating virtual environment…
 Installing Python packages…
 Installation succeeded.
 Traceback (most recent call last):
   File "/opt/eff.org/certbot/venv/bin/letsencrypt", line 7, in 
     from certbot.main import main
   File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/certbot/main.py", line 2, in 
     from certbot._internal import main as internal_main
   File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/certbot/_internal/main.py", line 10, in 
     import josepy as jose
   File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/josepy/init.py", line 41, in 
     from josepy.interfaces import JSONDeSerializable
   File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/josepy/interfaces.py", line 7, in 
     from josepy import errors, util
   File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/josepy/util.py", line 7, in 
     import OpenSSL
   File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/OpenSSL/init.py", line 8, in 
     from OpenSSL import crypto, SSL
   File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/OpenSSL/crypto.py", line 12, in 
     from cryptography import x509
 ImportError: No module named cryptography

Solution

rm -rf /opt/eff.org/*
pip install -U certbot
certbot renew --debug
 certbot

Leave a Reply