[Numpy-discussion] ANN: NumPy 1.8.1 release

Chris Barker chris.barker at noaa.gov
Mon Mar 31 14:55:45 EDT 2014


On Mon, Mar 31, 2014 at 10:18 AM, Matthew Brett <matthew.brett at gmail.com>wrote:

> > Bonus question: do you think a similar solution could work for windows
> > and / or linux?
>
> For linux - yes - I think that should be easy with a combination of
> ``ldd`` to find the dependencies and ``patchelf`` to set the rpath to
> point to the copied library.
>

that part, yes, but isn't Linux too much of a varying target for there to
be any point anyway?


> For Windows - I believe that it is not possible to set relative paths
> for windows DLLs, but I'd be very happy to be corrected.  There is a
> function SetDllDirectory [1], but this would need some extra extension
> code in the package.  Windows experts - is that an option?
>

The "usual" way is to put the dll next to where it is needed. I _think_ a
when a one dll (the pyton extension) is linked to another one, the first
place windows looks is right next to the one loading it -- same as for dlls
linked to main executables.

Unfortunately, anywehre else and all bets are off -- I was fighting with
this a while back and found what I think is the source of "DLL Hell" --
it's the combination of these two:

1) Windows looks next to the executable for dll.
2) The search  PATH for executables and dlls is the same.

So some folks put dlls next to the executable
And other folks get bit because the search PATH finds dlls next to
unrelated executables.

The python.org python install has a DLLs directory:

C:\Python27\DLLs

Maybe putting them there with nice long, non-standard names would work.

Has anyone looked at how Anaconda does it?

-Chris

-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20140331/6c2be97c/attachment.html>


More information about the NumPy-Discussion mailing list