当尝试从枕头导入ImageCms时出现此导入错误。我确认仅安装了Pillow 6.0.0版本的PIL。
Python 3.6.8 | Anaconda,Inc. |
In [1]: from PIL import ImageCms
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
~/anaconda3/lib/python3.6/site-packages/PIL/ImageCms.py in <module>
22 try:
---> 23 from PIL import _imagingcms
24 except ImportError as ex:
ImportError: cannot import name '_imagingcms'
During handling of the above exception, another exception occurred:
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-5649c7a5961e> in <module>
----> 1 from PIL import ImageCms
~/anaconda3/lib/python3.6/site-packages/PIL/ImageCms.py in <module>
25 # Allow error import for doc purposes, but error out when accessing
26 # anything in core.
---> 27 from _util import deferred_error
28 _imagingcms = deferred_error(ex)
29 from PIL._util import isStringType
ModuleNotFoundError: No module named '_util'