<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Hi,<div><br></div><div>After struggling for over a day using ‘port’ to uninstall and subsequentialy install packages revealed using 'sudo port install openslide’, it finally failed installing ‘llvm-3.5’:</div><div><br></div><div><div>---> Found 102 broken files, matching files to ports</div><div>Warning: No port llvm-3.5 found in the index; can't rebuild</div><div>---> Broken files found, but all associated ports are not in the index and so cannot be rebuilt.</div></div><div><br></div><div>‘pip’ also can’t install openslide.</div><div><br></div><div>So installed Miniconda. It seemed to install openslide OK but ‘import openslide’ fails as below: I don’t want to struggle finding another way to read .svs files, so I’m hoping there is something that can be done to make openslide operational on my Mac Studio initially cloned from an Intel MacBook Pro. ‘brew’ was reinstalled and used to install python 3.11.</div><div># -----------------------------------------------------------------</div><div><div>(dl4cv) sauer : Sep_2023_dev $ python3</div><div>Python 3.11.5 (main, Aug 24 2023, 15:09:45) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin</div><div>Type "help", "copyright", "credits" or "license" for more information.</div><div>>>> import openslide</div><div>Traceback (most recent call last):</div><div> File "/opt/homebrew/lib/python3.11/site-packages/openslide/lowlevel.py", line 74, in _load_library</div><div> return try_load(['libopenslide.1.dylib', 'libopenslide.0.dylib'])</div><div> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</div><div> File "/opt/homebrew/lib/python3.11/site-packages/openslide/lowlevel.py", line 58, in try_load</div><div> return cdll.LoadLibrary(name)</div><div> ^^^^^^^^^^^^^^^^^^^^^^</div><div> File "/opt/homebrew/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ctypes/__init__.py", line 454, in LoadLibrary</div><div> return self._dlltype(name)</div><div> ^^^^^^^^^^^^^^^^^^^</div><div> File "/opt/homebrew/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ctypes/__init__.py", line 376, in __init__</div><div> self._handle = _dlopen(self._name, mode)</div><div> ^^^^^^^^^^^^^^^^^^^^^^^^^</div><div>OSError: dlopen(libopenslide.0.dylib, 0x0006): tried: 'libopenslide.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibopenslide.0.dylib' (no such file), '/opt/homebrew/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/Resources/Python.app/Contents/MacOS/../../../../../../../../../../../lib/libopenslide.0.dylib' (no such file), '/usr/lib/libopenslide.0.dylib' (no such file, not in dyld cache), 'libopenslide.0.dylib' (no such file), '/usr/local/lib/libopenslide.0.dylib' (no such file), '/usr/lib/libopenslide.0.dylib' (no such file, not in dyld cache)</div><div><br></div><div>During handling of the above exception, another exception occurred:</div><div><br></div><div>Traceback (most recent call last):</div><div> File "<stdin>", line 1, in <module></div><div> File "/opt/homebrew/lib/python3.11/site-packages/openslide/__init__.py", line 31, in <module></div><div> from openslide import lowlevel</div><div> File "/opt/homebrew/lib/python3.11/site-packages/openslide/lowlevel.py", line 92, in <module></div><div> _lib = _load_library()</div><div> ^^^^^^^^^^^^^^^</div><div> File "/opt/homebrew/lib/python3.11/site-packages/openslide/lowlevel.py", line 83, in _load_library</div><div> raise ModuleNotFoundError(</div><div>ModuleNotFoundError: Couldn't locate OpenSlide dylib. Is OpenSlide installed correctly? <a href="https://openslide.org/api/python/#installing">https://openslide.org/api/python/#installing</a></div><div>>>></div></div><div># -----------------------------------------------------------------</div><div>Cheers,</div><div> Jon</div><div><br><blockquote type="cite"><div>On Aug 31, 2023, at 2:53 PM, Jon Sauer <jon.sauer@gmail.com> wrote:</div><br class="Apple-interchange-newline"><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Hi Benjamin,<div><br></div><div>Yes indeed, my whole environment on the new Mac Studio was migrated from my old 15” 2016 MacBook Pro, an x86_64 machine just as you surmised.</div><div><br></div><div>Many, many thanks. I’ll make the necessay changes, only mention something again if I can’t make it work.</div><div><br></div><div>Thanks again.</div><div><br></div><div>Cheers,</div><div> Jon</div><div><br></div><div><div style="text-align: -webkit-auto; font-variant-ligatures: normal; font-variant-east-asian: normal; font-variant-position: normal; line-height: normal; orphans: 2; widows: 2; overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Jon.Sauer@gmail.com</div><div style="text-align: -webkit-auto; font-variant-ligatures: normal; font-variant-east-asian: normal; font-variant-position: normal; line-height: normal; orphans: 2; widows: 2; overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">cell: +1.303.579.3009</div><div style="text-align: -webkit-auto; font-variant-ligatures: normal; font-variant-east-asian: normal; font-variant-position: normal; line-height: normal; orphans: 2; widows: 2; overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">White River Junction, VT, USA</div><div style="text-align: -webkit-auto; font-variant-ligatures: normal; font-variant-east-asian: normal; font-variant-position: normal; line-height: normal; orphans: 2; widows: 2; overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><br></div><div><br><blockquote type="cite"><div>On Aug 31, 2023, at 12:34 PM, Benjamin Gilbert <bgilbert@cs.cmu.edu> wrote:</div><br class="Apple-interchange-newline"><div><div>On Thu, Aug 31, 2023 at 11:32 AM Jon Sauer <jon.sauer@gmail.com> wrote:<br><blockquote type="cite">OSError: dlopen(/usr/local/lib/libopenslide.dylib, 0x0006): tried: '/usr/local/lib/libopenslide.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/lib/libopenslide.dylib' (no such file), '/usr/local/lib/libopenslide.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/usr/local/Cellar/openslide/3.4.1_7/lib/libopenslide.0.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/Cellar/openslide/3.4.1_7/lib/libopenslide.0.dylib' (no such file), '/usr/local/Cellar/openslide/3.4.1_7/lib/libopenslide.0.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64’))<br></blockquote><br>OpenSlide Python found your Homebrew copy of OpenSlide in /usr/local,<br>but couldn't load it because it's an x86_64 binary instead of an arm64<br>binary. On ARM, Homebrew installs into /opt/homebrew instead. Is it<br>possible that your Homebrew installation was migrated from a previous<br>x86_64 machine? You might consider removing and reinstalling Homebrew<br>so you have native ARM binaries. That should also fix the error<br>you're seeing.<br><br>--Benjamin Gilbert<br></div></div></blockquote></div><br></div></div></div></blockquote></div><br></body></html>