ImportError: No module named _ssl

Published by

Posted on August 08, 2018

Python error when trying to import ssl

File “/usr/local/lib/python2.7/ssl.py”, line 60, in <module>
import _ssl # if we can’t import it, let the error propagate
ImportError: No module named _ssl

 

solution:

You can rebuild python from the source or copy the library from another server.

File location

/usr/local/python27/lib/python2.7/lib-dynload/_ssl.so

Once the file has been copied. You will need to ensure the user and group is set to root.


About the Author