ImportError: Couldn't locate OpenSlide dylib. Is OpenSlide installed?
pbeneteau opened this issue · 2 comments
pbeneteau commented
I'm trying to use openslide on an Apple Silicon Mac (ARM).
What I did:
brew install openslide
python3 -m venv env
source env/bin/activate
pip install openslide-python
What I get:
Traceback (most recent call last):
File "/Users/paulbeneteau/Documents/GitHub/PyHisto-Electron/backend/./deepzoom_server.py", line 30, in <module>
import openslide
File "/Users/paulbeneteau/Documents/GitHub/PyHisto-Electron/backend/env/lib/python3.9/site-packages/openslide/__init__.py", line 35, in <module>
from openslide import lowlevel
File "/Users/paulbeneteau/Documents/GitHub/PyHisto-Electron/backend/env/lib/python3.9/site-packages/openslide/lowlevel.py", line 56, in <module>
raise ImportError("Couldn't locate OpenSlide dylib. " +
ImportError: Couldn't locate OpenSlide dylib. Is OpenSlide installed?
bgilbert commented
Probably Brew doesn't install OpenSlide in the dylib search path. Mixing package managers on Macs can be a bit dicey for that reason.
pbeneteau commented
Here is what I did to make it works:
sudo ln -s /opt/homebrew/lib/libopenslide.dylib //usr/local/lib/libopenslide.dylib