解决安装torchvision时import报错ImportError: cannot import name ‘PILLOW_VERSION‘ from ‘PIL‘ 问题

 在anaconda环境下安装pytorch1.2.0版本和torchvision0.4.0。安装成功之后尝试import包:

解决安装torchvision时import报错ImportError: cannot import name ‘PILLOW_VERSION‘ from ‘PIL‘ 问题_第1张图片

我的配置版本:

win10

python 3.7

cuda 10.0

pytorch 1.2.0

torchvision 0.4.0

pillow 9.5.0

查阅资料看是由于pillow版本太高,将pillow版本降低后解决问题:

pip uninstall pillow

pip install pillow==6.2.2

重新安装低版本的pillow后成功:

 

你可能感兴趣的:(pillow,python,conda)