Opened 3 years ago
Last modified 3 years ago
#63492 closed defect
py37-openslide @1.1.2_1: OSError: dlopen(libopenslide.0.dylib, 6): image not found — at Version 2
Reported by: | DavidBAEpstein | Owned by: | bgilbert (Benjamin Gilbert) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.7.1 |
Keywords: | Cc: | ||
Port: | openslide, py-openslide |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
virtual environment created with
conda create -n openslide_bug python=3.7
python command import openslide fails
Attaching files with descriptive names
MacBook Pro (Retina, 15-inch, Mid 2015)
Macos 11.5.2
Change History (5)
Changed 3 years ago by DavidBAEpstein
Attachment: | buggy.py_with_output added |
---|
Changed 3 years ago by DavidBAEpstein
Attachment: | port_installed added |
---|
Changed 3 years ago by DavidBAEpstein
Attachment: | conda_list added |
---|
comment:1 Changed 3 years ago by DavidBAEpstein
Description: | modified (diff) |
---|
comment:2 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|---|
Owner: | set to bgilbert |
Port: | py-openslide added; py37-openslide removed |
Priority: | High → Normal |
Status: | new → assigned |
Summary: | openslide @3.4.1_1 (active) py37-openslide @1.1.2_1 (active) Using python3.7. → py37-openslide @1.1.2_1: OSError: dlopen(libopenslide.0.dylib, 6): image not found |
Note: See
TracTickets for help on using
tickets.
The error shown in the first attached file is:
Does /opt/local/lib/libopenslide.0.dylib exist? If so, what's the output of
otool -L /opt/local/lib/libopenslide.0.dylib
? What I'm looking for is whether the second line of output lists the full library path as it should (/opt/local/lib/libopenslide.0.dylib) or just its name (libopenslide.0.dylib). Our binary packages of openslide look like they have the correct full library path.dlopen probably needs a full path to the library file to work, but the error message only listed the library name. Looking closer at the error message, I see that the problem is probably here:
Looks like py-openslide's code explicitly calls
cdll.LoadLibrary('libopenslide.0.dylib')
. Presumably that will need to be changed to use the absolute library path, i.e.cdll.LoadLibrary('/opt/local/lib/libopenslide.0.dylib')
.The code in lowlevel.py reads:
The advice in those comments seems terrible to me: users should most certainly not add the MacPorts lib directory to DYLD_LIBRARY_PATH; that will break immense numbers of things. The developers of py-openslide should fix their software so that that's not necessary.