3rd party python module with pyd picking up wrong dlls

P

Pix

Hi,

I'm trying to install OpenSSL by placing it in site-packages\OpenSSL.
In the directory there the following files,

crypto.pyd
libeay32.dll
rand.pyd
SSL.pyd
ssleay32.dll

When i try to import the module by doing "import OpenSSL" i get an
import error saying "ImportError: DLL load failed: The specified
module could not be found". It turns out that there is another module
(call it XXX) that is install which contains different versions of
libeay32.dll and ssleay32.dll. And the path to the XXX appears earlier
in os.environ['PATH'] than the OpenSSL dir. So this cause it to pick
up the wrong dll which in turn causes the import error. If i renamed
the dlls in XXX's dir then the import will work fine.

So my question is, shouldn't the import be picking up the dlls in the
module directory first before following the PATH in it's search order?
Seem that is doesn't make sense because if i put OpenSSL earlier in
the path, it would work for OpenSSL, but then XXX will be picking up
the wrong dll.

Any help is much appreciated!

Regards,
Pix
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,701
Latest member
XavierQ83

Latest Threads

Top