ImportError: The _imaging extension was built for another version of Pillow or PIL

解決方案:

  • 打開 image.py文件,位置: C:\ProgramData\Anaconda3\Lib\site-packages\PIL
  • 找到:
if PILLOW_VERSION != getattr(core, 'PILLOW_VERSION', None):
	raise ImportError("The _imaging extension was built for another "
	"version of Pillow or PIL:\n"
	"Core version: %s\n"
	"Pillow version: %s" %
	(getattr(core, 'PILLOW_VERSION', None),
	PILLOW_VERSION))
  • 修改爲:
if core.PILLOW_VERSION != getattr(core, 'PILLOW_VERSION', None):
	raise ImportError("The _imaging extension was built for another "
	"version of Pillow or PIL:\n"
	"Core version: %s\n"
	"Pillow version: %s" %
	(getattr(core, 'PILLOW_VERSION', None),
	PILLOW_VERSION))

或者卸載你的pillow,再重新安裝

原文:https://github.com/amueller/word_cloud/issues/225

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章