Let's Encrypt Error on Ubuntu 16.04

certbot-auto --apache -d website.com
Upgrading certbot-auto 0.10.1 to 0.17.0...
Replacing certbot-auto...
Error: couldn't get currently installed version for /home/ubuntu/.local/share/letsencrypt/bin/letsencrypt:
Traceback (most recent call last):
  File "/home/ubuntu/.local/share/letsencrypt/bin/letsencrypt", line 7, in 
    from certbot.main import main
  File "/home/ubuntu/.local/share/letsencrypt/local/lib/python2.7/site-packages/certbot/main.py", line 13, in 
    from acme import jose
  File "/home/ubuntu/.local/share/letsencrypt/local/lib/python2.7/site-packages/acme/jose/__init__.py", line 37, in 
    from acme.jose.interfaces import JSONDeSerializable
  File "/home/ubuntu/.local/share/letsencrypt/local/lib/python2.7/site-packages/acme/jose/interfaces.py", line 9, in 
    from acme.jose import util
  File "/home/ubuntu/.local/share/letsencrypt/local/lib/python2.7/site-packages/acme/jose/util.py", line 4, in 
    from cryptography.hazmat.primitives.asymmetric import rsa
  File "/home/ubuntu/.local/share/letsencrypt/local/lib/python2.7/site-packages/cryptography/hazmat/primitives/asymmetric/rsa.py", line 14, in 
    from cryptography.hazmat.backends.interfaces import RSABackend
  File "/home/ubuntu/.local/share/letsencrypt/local/lib/python2.7/site-packages/cryptography/hazmat/backends/__init__.py", line 7, in 
    import pkg_resources
  File "/home/ubuntu/.local/share/letsencrypt/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 36, in 
    import plistlib
  File "/usr/lib/python2.7/plistlib.py", line 62, in 
    import datetime
ImportError: No module named datetime

Solved with the following:

rm ~/.local/share/letsencrypt -R

Tags

 SSL  TLS  HTTPS  Ubuntu  Lets Encrypt  ubuntu 16.04