title: How to fix ImportError: No module named cryptography?
body: <p>I want to auto renew certificate via certbot, but not working, got error "ImportError: No module named cryptography"</p>
  
  <p><strong># ./certbot-auto --dry-run</strong></p>
  
  <p>Error: couldn't get currently installed version for /opt/eff.org/certbot/venv/bin/letsencrypt:
  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 10, in 
      import josepy as jose
    File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/josepy/<strong>init</strong>.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/<strong>init</strong>.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
  <strong>ImportError: No module named cryptography</strong></p>
  
  <p>I tried to install cryptography, and got this result</p>
  
  <p><strong>sudo /opt/eff.org/certbot/venv/bin/pip install cryptography</strong></p>
  
  <p>You are using pip version 9.0.1, however version 19.2.3 is available.
  You should consider upgrading via the 'pip install --upgrade pip' command.</p>
  
  <p>Then I tried this command
  <strong>pip install --upgrade pip</strong></p>
  
  <p>DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at <a href="https://pip.pypa.io/en/latest/development/release-process/#python-2-support" rel="noreferrer">https://pip.pypa.io/en/latest/development/release-process/#python-2-support</a>
  Requirement already up-to-date: pip in /usr/lib/python2.7/dist-packages/pip-19.2.3-py2.7.egg (19.2.3)</p>
  
  <p>How to get cryptography installed?</p>