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
How do I tell pip where Pillow needs to look for Pillow-Modules (like libjpeg, libtiff?)
I'm on OSX Big Sur, arm64 architecture and need Python 3.8 in order to run Keras.
OS: Big Sur 11.2
Python: 3.8
Pillow: 8.1.0
As per instruction on the homebrew website I have installed python 3.8 and its packages into /opt/homebrew/lib/python3.8/
python3 -m pip install Pillow --no-cache-dir
Collecting Pillow
Downloading Pillow-8.1.0.tar.gz (44.9 MB)
|████████████████████████████████| 44.9 MB 1.3 MB/s
Building wheels for collected packages: Pillow
Building wheel for Pillow (setup.py) ... done
Created wheel for Pillow: filename=Pillow-8.1.0-cp38-cp38-macosx_11_0_arm64.whl size=528914 sha256=fa6d3dac05ed7f101de315304c41aa43b86b622a41ee745ab28f9376bc65b9ab
Stored in directory: /private/var/folders/nw/40xtxx5s5rld0d0hddbndnf00000gn/T/pip-ephem-wheel-cache-3ob_jkx9/wheels/4e/db/04/9dcbaf9865568850d9bbdeb9b6b697e70f804d18e7e8aac050
Successfully built Pillow
Installing collected packages: Pillow
Successfully installed Pillow-8.1.0
When I called Python with
importPILfromPILimportImage
I've got the following error message
from PIL import Image
File "/Users/name/Library/Python/3.8/lib/python/site-packages/PIL/Image.py", line 94, in <module>
from . import _imaging as core
ImportError: dlopen(/Users/name/Library/Python/3.8/lib/python/site-packages/PIL/_imaging.cpython-38-darwin.so, 2): Symbol not found: _jpeg_resync_to_restart
Referenced from: /Users/name/Library/Python/3.8/lib/python/site-packages/PIL/_imaging.cpython-38-darwin.so
Expected in: flat namespace
in /Users/francis/Library/Python/3.8/lib/python/site-packages/PIL/_imaging.cpython-38-darwin.so
now brew install libjpeg
successfully installed libjpeg, but the error remained.
So I manually installed libjpeg to /usr/local/lib and it solved the problem.
curl -L -O http://ijg.org/files/jpegsrc.v9d.tar.gz
tar -xvf jpegsrc.v9d.tar.gz
cd jpeg-9d
./configure CFLAGS="-arch arm64" CXXFLAGS="-arch arm64" LDFLAGS="-arch arm64" CC="clang"
make
sudo make install
Only for the next error to occur, which was a missing libtiff. Yet libtiff is allready brewed and installed at /opt/homebrew/Cellar/libtiff/4.2.0. Again it didn't an Pillow now throws this error on runtime:
…
ImportError: dlopen(/Users/name/Library/Python/3.8/lib/python/site-packages/PIL/_imaging.cpython-38-darwin.so, 2): Symbol not found: _TIFFClientOpen
Referenced from: /Users/name/Library/Python/3.8/lib/python/site-packages
…
How do I solve this beyond installing libtiff manually (because it goes on with further modules, doesn't it)?
The text was updated successfully, but these errors were encountered:
Hi. Part of the problem here is that Pillow hasn't yet uploaded arm64 wheels to PyPI. If you are interested in a quick and easy solution, I would recommend downloading the wheel from #5093 (comment), expanding, and then python3 -m pip install Pillow-8.0.1-cp38-cp38-macosx_11_0_arm64.whl
I uninstalled pillow and reinstalled it from the above mentioned wheel. This time it worked. I think earlier, when I tried that I had my homebrew still installed under /usr/lib and the pillow of the wheel v.8.0.1 failed to install because I had pillow v.8.1.0 installed elsewhere.
Thanks for your comments. now I wonder, if I should uninstall the manually installed libjpeg. Let's see. Thanks so far.
How do I tell pip where Pillow needs to look for Pillow-Modules (like libjpeg, libtiff?)
I'm on OSX Big Sur, arm64 architecture and need Python 3.8 in order to run Keras.
As per instruction on the homebrew website I have installed python 3.8 and its packages into /opt/homebrew/lib/python3.8/
When I called Python with
I've got the following error message
now
brew install libjpeg
successfully installed libjpeg, but the error remained.
So I manually installed libjpeg to /usr/local/lib and it solved the problem.
Only for the next error to occur, which was a missing libtiff. Yet libtiff is allready brewed and installed at /opt/homebrew/Cellar/libtiff/4.2.0. Again it didn't an Pillow now throws this error on runtime:
How do I solve this beyond installing libtiff manually (because it goes on with further modules, doesn't it)?
The text was updated successfully, but these errors were encountered: