Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ModuleNotFoundError: No module named 'OpenSSL'

Tags:

python

openssl

In Python 3.6 I am getting a ModuleNotFoundError:

>>> import OpenSSL
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'OpenSSL'

Why can't Python find the OpenSSL module?

like image 571
Soundtemple Avatar asked Mar 07 '17 00:03

Soundtemple


1 Answers

The OpenSSL module comes from the pyOpenSSL library. You can install it with Pip using a command like:

pip install pyOpenSSL

If it fails due to missing dependencies, see the instructions on installing pyOpenSSL's dependencies in this answer to "How to install OpenSSL for Python".

(Also, as with all pip installs, depending upon your environment, you may need to write sudo before pip to run as root, and you may need to use a version-specific pip command like pip3 or pip2.)

like image 56
Mark Amery Avatar answered Sep 18 '22 21:09

Mark Amery