Installing the SSL Module for Python (2.5.4) on Windows

since AppEngine requires downloading your applications via SSL. I tried to install the module on my work laptop.

This is an x64 Win 7 system with Python 2.5.4 x86 installed.

I followed guides like this one: How to install Python ssl module on Windows? as well as all related links.

But the main problem is that neither MinGw nor GnuWin seem to really work.

GnuWin is perfectly installed, updated, and has all the dependencies needed to create the SSL module.

But typing

> "C:\Python25\python.py" setup.py install -c mingw32 

just fails badly. Thus, "-cmingw32" and "-gnuwin32". (-cmingw32 obviously does not work, because although MinGW is fully installed, MinGw is not registered)

"build", instead of installing, seems to "output" something: MinGw complains about "ggc no such file or directory", and with GnuWin "he does not know how to compile C / C ++ to nt with gnuwin"

It sounds like complete rubbish to me because I did everything as described in the textbooks.

I fixed one part of my problem: gcc now gets the recognition of easy_install, but AE still complains about the missing SSL module, although both: easy_install and python say that Pycrypto is on. SSL successfully installed

easy_install ssl

 C:\Users\faits>easy_install ssl Searching for ssl Best match: ssl 1.15 Adding ssl 1.15 to easy-install.pth file Using c:\python25\lib\site-packages Processing dependencies for ssl Finished processing dependencies for ssl 

easy_install pycrypto

 C:\Users\faits>easy_install ssl Searching for ssl Best match: ssl 1.15 Adding ssl 1.15 to easy-install.pth file Using c:\python25\lib\site-packages Processing dependencies for ssl Finished processing dependencies for ssl 

Python

 IDLE 1.2.4 >>> import ssl Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> import ssl File "C:\Python25\lib\site-packages\ssl\__init__.py", line 61, in <module> import _ssl2 # if we can't import it, let the error propagate ImportError: No module named _ssl2 

Python

 >>> import pycrypto Traceback (most recent call last): File "<pyshell#1>", line 1, in <module> import pycrypto ImportError: No module named pycrypto 
+4
source share
2 answers

Use -c with the build command.

For comparison:

$ python setup.py install -c

 --compile (-c) compile .py to .pyc [default] 

with:

$ python setup.py build -c

 --compiler (-c) specify the compiler type 

To find out other options, run:

$ python setup.py build --help

0
source

I well summed up all the instructions at the following link. Check this. http://waqasshabbir.tumblr.com/post/18010535789/ssl-module-for-python-2-5-installation-windows-only

+3
source

Source: https://habr.com/ru/post/1336517/


All Articles