openslide on Apple silicon?

Jon Sauer jon.sauer at gmail.com
Tue Sep 5 15:30:41 EDT 2023


Hi John,

Many, many thanks. Things worked similarly to your setup after I moved
# ------------ below ------------ 
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  230809 ~0940
# https://towardsdatascience.com/the-ultimate-python-and-tensorflow-set-up-guide-for-apple-silicon-macs-m1-m2-e9ef304a2c06
#
# homebrew setup, following https://noahpeeters.de/posts/apple-silicon/homebrew-setup/
#
if [ -d "/opt/homebrew/bin" ]; then
    export PATH="/opt/homebrew/bin:$PATH"
fi
# ------------ above ——————

from .bashrc to .bash_profile. I don’t understand why PATH didn’t contain /opt/homebrew/bin earlier but it does now.

Again, many thanks.

Cheers,
  Jon

Jon.Sauer at gmail.com
cell: +1.303.579.3009
White River Junction, VT, USA

> On Sep 5, 2023, at 1:11 PM, jcupitt at gmail.com wrote:
> 
> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/openslide-users/attachments/20230905/5da7b708/attachment.html>


More information about the openslide-users mailing list