[Twisted-Python] OpenSSL problem
![](https://secure.gravatar.com/avatar/917e9407f1027d3e6e4bc1a16d49b632.jpg?s=120&d=mm&r=g)
Hello Folks: I am using client.getPage with a URL that uses the https protocol. I get the error from OpenSSL import SSL ImportError: No module named OpenSSL I downloaded the Win32 binary for OpenSSL and pyOpenSSL. I get the error - error - Python was build with Visual Studio 7.1 and extensions need to be built with same version of compiler, but it isn't installed. I don't have Visual Studio 7.1. And I used a pre-compiled Stackless Python binary. Is there an easy way to get around this without say, recompiling Stackless (and compiling OpenSSL) with cygwin gcc? Cheers, Andrew ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs
![](https://secure.gravatar.com/avatar/3b7e6c77a5412587152c9e3f22b41c2a.jpg?s=120&d=mm&r=g)
On Nov 30, 2007, at 8:10 AM, Andrew Francis wrote:
The error message is in error. Here is the Python issue ticket in which the message was changed from stating that you have to use the same compiler that was used to build Python, to instead stating that you have to use a compiler that is compatible with the one that was used to build Python: http://bugs.python.org/issue1257728 In my experience, simply setting "compiler=mingw32" in your distutils config file works for all extension modules that I have tried *except* for pyOpenSSL. I don't remember the details, but I have a note here which says that I was unable to build pyOpenSSL for myself. Here's a ticket saying that I don't like pyOpenSSL because it is unmaintained and I don't know how to build it: http://allmydata.org/trac/tahoe/ticket/11 Note that there are apparently some problems with using the cygwin gcc -mno-cygwin (a.k.a. the mingw32 compiler) to build Python extension modules, but these problems are limited to specific kinds of interaction between extension modules, namely that you can either build your modules so that they can safely exchange std::iostreams with the Python executable or with other modules that were built with Visual Studio, or you can build your modules so that they can safely exchange FILE*'s, but not both. I haven't experienced this issue myself. Here is a mailing list message describing it: http://mail.python.org/pipermail/distutils-sig/2007-September/ 008255.html Regards, Zooko
![](https://secure.gravatar.com/avatar/3b7e6c77a5412587152c9e3f22b41c2a.jpg?s=120&d=mm&r=g)
On Nov 30, 2007, at 8:10 AM, Andrew Francis wrote:
The error message is in error. Here is the Python issue ticket in which the message was changed from stating that you have to use the same compiler that was used to build Python, to instead stating that you have to use a compiler that is compatible with the one that was used to build Python: http://bugs.python.org/issue1257728 In my experience, simply setting "compiler=mingw32" in your distutils config file works for all extension modules that I have tried *except* for pyOpenSSL. I don't remember the details, but I have a note here which says that I was unable to build pyOpenSSL for myself. Here's a ticket saying that I don't like pyOpenSSL because it is unmaintained and I don't know how to build it: http://allmydata.org/trac/tahoe/ticket/11 Note that there are apparently some problems with using the cygwin gcc -mno-cygwin (a.k.a. the mingw32 compiler) to build Python extension modules, but these problems are limited to specific kinds of interaction between extension modules, namely that you can either build your modules so that they can safely exchange std::iostreams with the Python executable or with other modules that were built with Visual Studio, or you can build your modules so that they can safely exchange FILE*'s, but not both. I haven't experienced this issue myself. Here is a mailing list message describing it: http://mail.python.org/pipermail/distutils-sig/2007-September/ 008255.html Regards, Zooko
participants (2)
-
Andrew Francis
-
zooko