openslide on Apple silicon?

jcupitt at gmail.com jcupitt at gmail.com
Tue Sep 5 13:11:50 EDT 2023


I tried on my M2 mac mini and it seemed to work well with brew.

I have brew like this:

john at cheese ~/try $ echo $PATH
/Users/john/vips/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:...
etc.Z

And I've put openslide, python and pip on like this:

john at cheese ~/try $ brew install openslide
Warning: openslide 3.4.1_8 is already installed and up-to-date.
To reinstall 3.4.1_8, run:
  brew reinstall openslide
john at cheese ~/try $ which pip
/opt/homebrew/bin/pip
john at cheese ~/try $ which python3
/opt/homebrew/bin/python3

I then installed openslide-python with pip:

john at cheese ~/try $ pip install openslide-python
Collecting openslide-python
  Downloading openslide-python-1.3.0.tar.gz (358 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 358.9/358.9 kB 6.0 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting Pillow (from openslide-python)
  Obtaining dependency information for Pillow from
https://files.pythonhosted.org/packages/b7/ad/71982d18fd28ed1f93c31b8648f980ebdbdbcf7d8c9c9b4af59290914ce9/Pillow-10.0.0-cp311-cp311-macosx_11_0_arm64.whl.metadata
  Downloading Pillow-10.0.0-cp311-cp311-macosx_11_0_arm64.whl.metadata (9.5 kB)
Downloading Pillow-10.0.0-cp311-cp311-macosx_11_0_arm64.whl (3.1 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.1/3.1 MB 4.9 MB/s eta 0:00:00
Building wheels for collected packages: openslide-python
  Building wheel for openslide-python (setup.py) ... done
  Created wheel for openslide-python:
filename=openslide_python-1.3.0-cp311-cp311-macosx_13_0_arm64.whl
size=26428 sha256=e79d62ff8af5eadb9c3c26495448012dbcae458e411b47a4a86067033a47fc0c
  Stored in directory:
/Users/john/Library/Caches/pip/wheels/75/f2/b4/8a416a8f3c107db18b12d6255bcc00e4d6aa589d538395207c
Successfully built openslide-python
Installing collected packages: Pillow, openslide-python
Successfully installed Pillow-10.0.0 openslide-python-1.3.0

And I could now import openslide:

john at cheese ~/try $ python3
Python 3.11.5 (main, Aug 24 2023, 15:09:45) [Clang 14.0.3
(clang-1403.0.22.14.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import openslide
>>>

Hope this helps,

John


More information about the openslide-users mailing list