ImportError: cannot import name 'PILLOW_VERSION' from 'PIL'

32 Views Asked by At

I got an error when using torchvision

ImportError: cannot import name 'PILLOW_VERSION' from 'PIL' (E:\python\Monodepth2\src\.venv\lib\site-packages\PIL\__init__.py)

I found some information and found that this problem was because versions after pillow 7.0 removed 'PILLOW_VERSION'

, so I tried to install an earlier version.

pip install pillow==6

But encountered some problems

note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pillow
  Running setup.py clean for pillow
Failed to build pillow
ERROR: Could not build wheels for pillow, which is required to install pyproject.toml-based projects

The problem seems to be that I'm using python3.10 which doesn't support earlier versions of pillow, but I don't want to change my python version. Is there any way to solve these problems without changing the python version?

0

There are 0 best solutions below