Skip to content

FileNotFoundError: Could not find module 'libopenslide-0.dll'. #98

@ernestoarbitrio

Description

@ernestoarbitrio

Context

Issue type (bug report or feature request): bug
Operating system (e.g. Fedora 24, Mac OS 10.11, Windows 10): Windows 10
Platform (e.g. 64-bit x86, 32-bit ARM): 64 bit
OpenSlide Python version (openslide.__version__): 1.1.2
OpenSlide version (openslide.__library_version__): openslide-win64-20171122

Details

The problem happens only with python 3.8 while running a test suite that import openslide. Openslide bin directory is in the PATH env variable but:

    import openslide
c:\python38\lib\site-packages\openslide\__init__.py:35: in <module>
    from openslide import lowlevel
c:\python38\lib\site-packages\openslide\lowlevel.py:43: in <module>
    _lib = cdll.LoadLibrary('libopenslide-0.dll')
c:\python38\lib\ctypes\__init__.py:447: in LoadLibrary
    return self._dlltype(name)
c:\python38\lib\ctypes\__init__.py:369: in __init__
    self._handle = _dlopen(self._name, mode)
E   FileNotFoundError: Could not find module 'libopenslide-0.dll'. Try using the full path with constructor syntax.

I saw other related issues (#23) that have been fixed replacing line 41 on lowlevel.py with

_lib = cdll.LoadLibrary(ctypes.util.find_library("libopenslide-0.dll"))

Any idea?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions