You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Image import fails on macOS 10.13 with Pillow 9.1.0 #6179
Tried running from PIL import Image after installing Pillow from pip.
What did you expect to happen?
Import to work.
What actually happened?
Error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/alphons/.venv/rainbow-env/lib/python3.8/site-packages/PIL/Image.py", line 132, in <module>
from . import _imaging as core
ImportError: dlopen(/Users/alphons/.venv/rainbow-env/lib/python3.8/site-packages/PIL/_imaging.cpython-38-darwin.so, 2): Symbol not found: ____chkstk_darwin
Referenced from: /Users/alphons/.venv/rainbow-env/lib/python3.8/site-packages/PIL/.dylibs/libtiff.5.dylib (which was built for Mac OS X 11.0)
Expected in: /usr/lib/libSystem.B.dylib
in /Users/alphons/.venv/rainbow-env/lib/python3.8/site-packages/PIL/.dylibs/libtiff.5.dylib
Hi. We've changed a few settings in our wheels since January, so this could be a number of different things. I've put together a Pillow 9.1.0 wheel for your system the way we did it for Pillow 9.0.1 - Pillow-9.1.0-cp38-cp38-macosx_10_10_x86_64.whl.zip. Would you be able to test it and see if that works?
If it does work, would you be willing to test out some more variations on that wheel, so that we can figure out exactly what the problem is? macOS 10.13 is not a system that I have easy access to.
If that doesn't work, and you're looking for things to try immediately, you can install Pillow from source - python3 -m pip install Pillow --no-binary :all:
you can install Pillow from source - python3 -m pip install Pillow --no-binary :all:
Installing from source worked for me. Thanks for looking into this, even though official support ended. Not everyone wants to update their systems, for various reasons. I always appreciate a path to keep legacy stuff working.
A similar problem happens with 9.4.0 on my mac osx high sierra
$ python
Python 3.10.9 (v3.10.9:1dd9be6584, Dec 6 2022, 14:37:36) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> fromPILimport Image
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/path/to/.venv310/lib/python3.10/site-packages/PIL/Image.py", line 103, in <module>
from . import _imaging as core
ImportError: dlopen(/Users/path/to/.venv310/lib/python3.10/site-packages/PIL/_imaging.cpython-310-darwin.so, 2): Library not loaded: @loader_path/libXdmcp.6.dylib
Referenced from: /Users/path/to/.venv310/lib/python3.10/site-packages/PIL/.dylibs/libxcb.1.1.0.dylib
Reason: no suitable image found. Did find:
/Users/path/to/.venv310/lib/python3.10/site-packages/PIL/.dylibs/libXdmcp.6.dylib: cannot load 'libXdmcp.6.dylib' (load command 0x80000034 is unknown)
/Users/path/to/.venv310/lib/python3.10/site-packages/PIL/.dylibs/libXdmcp.6.dylib: cannot load 'libXdmcp.6.dylib' (load command 0x80000034 is unknown)
>>> ^D
No problem with 9.3.0. Not opening a new ticket as my mac os x is 10.13.6 (high sierra). Building from source did not work for me, clang (14.0.3) raised errors about 'TARGET_OS_EMBEDDED' is not defined, the Xcode 10.1 is latest compatible with my mac osx high sierra.
Hi. We've released new wheels since, so you shouldn't still be having a problem with regular python3 -m pip install Pillow. If you'd like to open a new issue about it, we can have a discussion to try and figure out what is going on.
Activity
radarhere commentedon Apr 4, 2022
Hi. We've changed a few settings in our wheels since January, so this could be a number of different things. I've put together a Pillow 9.1.0 wheel for your system the way we did it for Pillow 9.0.1 - Pillow-9.1.0-cp38-cp38-macosx_10_10_x86_64.whl.zip. Would you be able to test it and see if that works?
If it does work, would you be willing to test out some more variations on that wheel, so that we can figure out exactly what the problem is? macOS 10.13 is not a system that I have easy access to.
If that doesn't work, and you're looking for things to try immediately, you can install Pillow from source -
python3 -m pip install Pillow --no-binary :all:hugovk commentedon Apr 4, 2022
Note that macOS 10.13 (High Sierra) is now 16 months EOL and two versions out of support, so strictly speaking not supported by Pillow.
I also recommend upgrading to macOS 10.15 (Catalina) or later to get security updates from Apple.
AlphonsG commentedon Apr 4, 2022
Hello @radarhere
Yeah that worked:
Yeah I can do that
radarhere commentedon Apr 4, 2022
Thanks. See what you make of these.
AlphonsG commentedon Apr 5, 2022
Worked
Worked
Failed, with previous error.
Failed, with previous error.
Also, just a note, the name of files 1 and 2 after download is the same, didn't check if the files themselves are different or not though.
radarhere commentedon Apr 5, 2022
Ah, ok. I've got it now. The problem was python-pillow/pillow-wheels#265, and I've created python-pillow/pillow-wheels#282 to fix this for the next release.
This wheel works, yes? Pillow-9.1.0-cp38-cp38-macosx_10_10_x86_64.whl.zip
AlphonsG commentedon Apr 5, 2022
Yes that wheel works, thanks very much for fixing!
wulph111 commentedon Apr 7, 2022
Installing from source worked for me. Thanks for looking into this, even though official support ended. Not everyone wants to update their systems, for various reasons. I always appreciate a path to keep legacy stuff working.
radarhere commentedon Apr 8, 2022
In case more users come to this issue, here are wheels for other Python versions.
Pillow-9.1.0-cp37-cp37m-macosx_10_10_x86_64.whl.zip
Pillow-9.1.0-cp39-cp39-macosx_10_10_x86_64.whl.zip
Pillow-9.1.0-cp310-cp310-macosx_10_10_x86_64.whl.zip
jfbu commentedon Jan 3, 2023
A similar problem happens with
9.4.0on my mac osx high sierraNo problem with
9.3.0. Not opening a new ticket as my mac os x is 10.13.6 (high sierra). Building from source did not work for me,clang(14.0.3) raised errors about'TARGET_OS_EMBEDDED' is not defined, the Xcode 10.1 is latest compatible with my mac osx high sierra.radarhere commentedon Jan 3, 2023
Hi. You're having the same problem as #3068 (comment)
I suspect the change between Pillow 9.3.0 and 9.4.0 was because python-pillow/pillow-wheels#350 updated libXau to 1.0.11. Homebrew removed support for 10.15 when making that update - Homebrew/homebrew-core@712726c
If you would like to confirm my theory, you can test the wheels from https://github.com/radarhere/pillow-wheels/actions/runs/3825868768 - https://github.com/radarhere/pillow-wheels/suites/10148738168/artifacts/495813662. They are Pillow 9.4.0, but with libXau 1.0.10. If they work for you, then I'm right.
radarhere commentedon Jan 3, 2023
More specifically, you can
python3 -m pip install Pillow-9.4.0-cp310-cp310-macosx_10_10_x86_64.whlwithPillow-9.4.0-cp310-cp310-macosx_10_10_x86_64.whl.zip
jfbu commentedon Jan 3, 2023
Hi, yes confirmed it works for me!
radarhere commentedon Jan 4, 2023
Thanks. I've created python-pillow/pillow-wheels#357 as a possible solution to this.
radarhere commentedon Jan 5, 2023
python-pillow/pillow-wheels#358 was merged instead.
radarhere commentedon Jan 6, 2023
I've uploaded new Pillow 9.4.0 wheels. Installation should now work.
klarich commentedon Aug 10, 2023
This worked for me!
radarhere commentedon Aug 10, 2023
Hi. We've released new wheels since, so you shouldn't still be having a problem with regular
python3 -m pip install Pillow. If you'd like to open a new issue about it, we can have a discussion to try and figure out what is going on.klarich commentedon Aug 10, 2023
I think this is because Pillow is being installed by another library via conda and that library is installing an older version (9.4).