Python SSL support in Windows and opening MSI files

Wednesday 16 May 2007This is 16 years old. Be careful.

If you install ActivePython, you will not have SSL support installed. The socket module from the standard library will not have the ssl() function defined, because the _ssl.pyd dynamic library is missing, at least for Python 2.4. Maybe they’ve included it in the Python 2.5 kits.

One solution is to install the Python distribution from, but I didn’t want to do that because I like the other extras that ActivePython gives me. The other solution is to find the _ssl.pyd file from the Python distribution that matches your version of Python:

  • Download the .msi from the download area. If the exact version you need isn’t listed, find a close one and edit the URL: there are older versions that aren’t advertised on the main page.
  • Download lessmsi, a handy tool for opening up .msi files as if they were simple zip files.
  • Find the file _ssl.pyd in the .msi file and place it into your Python\DLLs directory.

You now have SSL support!


Ack. *Yes*, SSL support is included in ActivePython 2.5 builds. The ActivePython 2.4 builds haven't been updated since we got export approval to include crypto.
(Note: I'm the ActivePython guy at ActiveState.)
I ran into this a few weeks ago. I had ActivePython 2.4 and couldn't do SSL. Installing the standard Python 2.4 (from fixed the problem.

This morning I installed ActivePython 2.5 and the prob is indeed fixed.
Trent, I figured you would chime in with the details (I almost put a "Hi Trent!" in the post itself!)

Corey, good to have confirmation that 2.5 doesn't have the problem...

Add a comment:

Ignore this:
Leave this empty:
Name is required. Either email or web are required. Email won't be displayed and I won't spam you. Your web site won't be indexed by search engines.
Don't put anything here:
Leave this empty:
Comment text is Markdown.