Python PIL模块/无法初始化图像API

Python PIL模块/无法初始化图像API,python,macos,python-2.7,Python,Macos,Python 2.7,我正在运行OSX和Python 2.7。我拥有的应用程序需要PIL模块,当我尝试安装它时,会出现此错误 我试过几次安装,但似乎都没用。我怎样才能让它工作 WARNING 2012-04-18 18:15:54,222 dev_appserver.py:3394] Could not initialize images API; you are likely missing the Python "PIL" module. ImportError: dlopen(/Library/Python/

我正在运行OSX和Python 2.7。我拥有的应用程序需要PIL模块,当我尝试安装它时,会出现此错误

我试过几次安装,但似乎都没用。我怎样才能让它工作

WARNING  2012-04-18 18:15:54,222 dev_appserver.py:3394] Could not initialize images API; you are likely missing the Python "PIL" module. 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

解决方法是卸载所有内容,然后使用pip安装pil