ImportError: cannot import name ‘PILLOW_VERSION‘
Posted AI浩
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ImportError: cannot import name ‘PILLOW_VERSION‘相关的知识,希望对你有一定的参考价值。
错误信息:
D:\\ProgramData\\Anaconda3\\envs\\mytorch\\python.exe D:/cv/DCL-master/train.py
Traceback (most recent call last):
File "D:/cv/DCL-master/train.py", line 17, in <module>
from transforms import transforms
File "D:\\cv\\DCL-master\\transforms\\__init__.py", line 1, in <module>
from .transforms import *
File "D:\\cv\\DCL-master\\transforms\\transforms.py", line 16, in <module>
from . import functional as F
File "D:\\cv\\DCL-master\\transforms\\functional.py", line 5, in <module>
from PIL import Image, ImageOps, ImageEnhance, PILLOW_VERSION
ImportError: cannot import name 'PILLOW_VERSION' from 'PIL' (D:\\ProgramData\\Anaconda3\\envs\\mytorch\\lib\\site-packages\\PIL\\__init__.py)
解决方法:
将PILLOW_VERSION改为‘__version__’
以上是关于ImportError: cannot import name ‘PILLOW_VERSION‘的主要内容,如果未能解决你的问题,请参考以下文章
解决 ImportError: cannot import name pywrap_tensorflow
ImportError: cannot import name webdriver
ImportError: cannot import name patterns
window环境下ImportError: cannot import name 'Bar' from 'pyecharts'