Notes Help Flashback

0 notes &

ssl module for python 2.5 installation (windows only)

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.

Start as follows and DO NOT SKIP any steps unless you’re sure what you’re doing.

  1. Make sure that you’ve 32-bit version of Python 2.5 installed or install one from here.
  2. 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.
  3. 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 from here. Extract the files into the MinGW32 folder which is created as part of GCC installation.
  4. 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.
  5. Install openssl downloading the installer from here. Note the installation directory. In my case, it was C:\Program Files (x86)\GnuWin32.
  6. Download ssl module from here and unzip it in any location you like. Edit (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).
  7. Grab libgw32c from here. Extract the zip in the location you noted in step 5, replacing any directories that already exist.
  8. Open command prompt and change directory to root of extracted ssl module where file resides. Run python build -cmingw32. If you see no error, you’ve successfully built the binary distribution.
  9. Next run python install —skip-build
  10. That’s done! you can verify it by importing module in IDLE or python interactive shell by this statement: import ssl

Filed under python 2.5 ssl ssl installation windows