[Numpy-discussion] Numpy depends on OpenSSL ???
Wed Sep 23 15:16:24 CDT 2009
Robert Kern wrote:
> On Wed, Sep 23, 2009 at 10:52, Mark Sienkiewicz <firstname.lastname@example.org> wrote:
>> I have discovered the hard way that numpy depends on openssl.
>> I am building a 64 bit python environment for the macintosh. I
>> currently do not have a 64 bit openssl library installed, so the python
>> interpreter does not have hashlib. (hashlib gets its md5 function from
>> the openssl library.)
> There are builtin implementations that do not depend on OpenSSL.
> hashlib should be using them for MD5 and the standard SHA variants
> when OpenSSL is not available.
This is the clue that I needed. Here is where it led:
setup.py tries to detect the presence of openssl by looking for the
library and the include files. It detects the library that Apple
provided in /usr/lib/libssl.dylib and tries to build the openssl version
of hashlib. But when it actually builds the module, the link fails
because that library file is not for the correct architecture. I am
building for x86_64, but the library contains only ppc and i386.
The result is that hashlib cannot be imported, so the python installer
decides not to install it at all. That certainly appears to indicate
that the python developers consider hashlib to be optional, but it
_should_ work in most any python installation.
So, the problem is really about the python install automatically
detecting libraries. If I hack the setup.py that builds all the C
modules so that it can't find the openssl library, then it uses the
fallbacks that are distributed with python.
That gets me a as far as "EnvironmentError: math library missing; rerun
setup.py after setting the MATHLIB env variable", which is a big
improvement. (The math library is not missing, but this is a different
Thanks, and sorry for the false alarm.
More information about the NumPy-Discussion