我正在尝试按照说明安装 Pillow:
http://pillow.readthedocs.org/en/latest/installation.html#mac-os-x-installation
问题是我遇到了错误python -c 'from PIL import Image
。
python -c "from PIL import Image"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Library/Python/2.7/site-packages/PIL/Image.py", line 53, in <module>
from PIL import _imaging as core
ImportError: dlopen(/Library/Python/2.7/site-packages/PIL/_imaging.so, 2):
Symbol not found: _jpeg_resync_to_restart
Referenced from: /Library/Python/2.7/site-packages/PIL/_imaging.so
Expected in: flat namespace
in /Library/Python/2.7/site-packages/PIL/_imaging.so
消息说_jpeg_resync_to_restart
未找到,我用谷歌搜索尝试解决此问题,如下所示:
- 用于
brew
安装Pillow
:https ://github.com/Homebrew/homebrew-python - 安装 libjpeg 并从源安装:http ://www.thetoryparty.com/2010/08/31/pil-on-snow-leopard-_jpeg_resync_to_restart-error/
但是,没有任何效果。有没有办法在 Mavericks 上安装 Pillow?我使用 Python 2.7:默认的 Python 解释器。