Reputation: 449
What is the difference between
import ssl
and
import _ssl
I am running python code on different servers. On some servers, both works for me. On other servers, only the second one works, the first one gives me the following:
ImportError: No module named ssl
Upvotes: 5
Views: 442
Reputation: 15135
They are different modules. _ssl is an internal support module for SSL operations where ssl is the actual module providing SSL services. "No module named ssl" means that on that server python was not compiled with SSL support.
Upvotes: 5