-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
Installing anything that depends on PIL/pillow with PIP on an older Mac OS X/ OS X/ macOS (e.g. OS X Yosemite, 10.10.5) breaks, because the included pre-build "libXau.6.0.0.dylib" seems to be build without a compatibility fallback (aka needs a more recent version of the OS). I'm also not sure why this library is required at all on macOS, but that's just me wondering…
What did you do?
# prepare
$ cd /Volumes/Temporary/
$ python3.12 -m venv vcsitest
$ cd vcsitest/
$ source bin/activate
# install/use 'vcsi' as example case. Note: output reduced for clarity
(vcsitest) $ pip install vcsi
Collecting vcsi
Using cached vcsi-7.0.16-py3-none-any.whl.metadata (16 kB)
…
Collecting pillow<11.0.0,>=10.0.0 (from vcsi)
Using cached pillow-10.2.0-cp312-cp312-macosx_10_10_x86_64.whl.metadata (9.7 kB)
…
Installing collected packages: texttable, parsedatetime, pillow, numpy, MarkupSafe, jinja2, vcsi
Successfully installed MarkupSafe-2.1.5 jinja2-3.1.3 numpy-1.26.4 parsedatetime-2.6 pillow-10.2.0 texttable-1.7.0 vcsi-7.0.16
# try to run it
(vcsitest) $ bin/vcsi --version
Traceback (most recent call last):
File "/Volumes/Temporary/vcsitest/bin/vcsi", line 5, in <module>
from vcsi.vcsi import main
File "/Volumes/Temporary/vcsitest/lib/python3.12/site-packages/vcsi/vcsi.py", line 33, in <module>
from PIL import Image, ImageDraw, ImageFont
File "/Volumes/Temporary/vcsitest/lib/python3.12/site-packages/PIL/Image.py", line 84, in <module>
from . import _imaging as core
ImportError: dlopen(/Volumes/Temporary/vcsitest/lib/python3.12/site-packages/PIL/_imaging.cpython-312-darwin.so, 2): Library not loaded: @loader_path/libXau.6.0.0.dylib
Referenced from: /Volumes/Temporary/vcsitest/lib/python3.12/site-packages/PIL/.dylibs/libxcb.1.1.0.dylib
Reason: no suitable image found. Did find:
/Volumes/Temporary/vcsitest/lib/python3.12/site-packages/PIL/.dylibs/libXau.6.0.0.dylib: cannot load 'libXau.6.0.0.dylib' (load command 0x80000034 is unknown)
/Volumes/Temporary/vcsitest/lib/python3.12/site-packages/PIL/.dylibs/libXau.6.0.0.dylib: cannot load 'libXau.6.0.0.dylib' (load command 0x80000034 is unknown)What did you expect to happen?
Dylib loading to succeed. Application using pillow/PIL to run.
What actually happened?
Dylib failed to load, because of load command 0x80000034 is unknown (this load command is only supported by some way newer macOS version).
While I can't test/ verify this properly, I think all the other dylibs included in the package should work fine as they have the appropriate: LC_VERSION_MIN_MACOSX: version 10.10 (see otool -l <____>.dylib output):
$ cd /Volumes/Temporary/vcsitest/lib/python3.12/site-packages/PIL/.dylibs
# Note: output manually cleaned up for clarity here in the report
# Note: please note libXau missing the bits
$ for i in *.dylib; do echo -n "$i ->"; otool -l "$i" | fgrep ' version 10.'; done
libXau.6.0.0.dylib ->
libbrotlicommon.1.1.0.dylib -> version 10.10
libbrotlidec.1.1.0.dylib -> version 10.10
libfreetype.6.dylib -> version 10.10
libharfbuzz.0.dylib -> version 10.10
libjpeg.62.4.0.dylib -> version 10.10
liblcms2.2.dylib -> version 10.10
liblzma.5.dylib -> version 10.10
libopenjp2.2.5.0.dylib -> version 10.10
libpng16.16.dylib -> version 10.10
libsharpyuv.0.dylib -> version 10.10
libtiff.6.dylib -> version 10.10
libwebp.7.dylib -> version 10.10
libwebpdemux.2.dylib -> version 10.10
libwebpmux.3.dylib -> version 10.10
libxcb.1.1.0.dylib -> version 10.10
libz.1.3.dylib -> version 10.10What are your OS, Python and Pillow versions?
- OS: 10.10.5 (OS X Yosemite)
- Python: 3.12.2
- Pillow: 10.2.0 (binary/ pre-build release via PIP: pillow-10.2.0-cp312-cp312-macosx_10_10_x86_64)