【发布时间】:2014-02-18 22:55:18
【问题描述】:
我正在尝试按照说明安装 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未找到,我google了下尝试解决这个问题:
- 使用
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 解释器。
【问题讨论】:
标签: python macos python-imaging-library osx-mavericks pillow