http://waqasshabbir.tumblr.com/post/18010535789/ssl-module-for-python-2-5-installation-windows-onlyphp
I had a hard time installing ssl module for python 2.5 on windows. Since this package is included by default in python 2.7 one doesn’t need to go through all the hassle. However, if you’re working on Google App Engine for python 2.5, it might saves you hours of research. I’ve tried to make instructions as legible for newbies as possible.python
Start as follows and DO NOT SKIP any steps unless you’re sure what you’re doing.web
- Make sure that you’ve 32-bit version of Python 2.5 installed or install one from here.
- Install GCC using TDM-GCC project which is great for lowly windows users from here. Here do not forget to select ADD TO PATH check box while installation.
- This is an extra step, I could have reduced it but didn’t bother much as it’s already simple, which is VERY IMPORTANT otherwise you’d end up with errors for which there isn’t much help available. Download gcc-4.5.2-tdm-1-core.zip from here. Extract the files into the MinGW32 folder which is created as part of GCC installation.
- Open command prompt and run gcc —version, It should show gcc (tdm-1) 4.5.2. If you see the same, you’re doing good so far.
- Install openssl downloading the installer from here. Note the installation directory. In my case, it was C:\Program Files (x86)\GnuWin32.
- Download ssl module from here and unzip it in any location you like. Edit setup.py (you should be able to find this in the extracted files at root directory) and at line number 154, replace C:\Utils\GnuWin32 with the path as noted in step 5 (i.e. C:\Program Files (x86)\GnuWin32).
- Grab libgw32c from here. Extract the zip in the location you noted in step 5, replacing any directories that already exist.
- Open command prompt and change directory to root of extracted ssl module where setup.py file resides. Run python setup.py build -cmingw32. If you see no error, you’ve successfully built the binary distribution.
- Next run python setup.py install —skip-build
- That’s done! you can verify it by importing module in IDLE or python interactive shell by this statement: import ssl