Search notes:

Python library: Pillow

Pillow is the Python Imaging Library, which is a fork of PIL (which was discontinued in 2011). In fact, Pillow and PIL cannot co-exist in the same environment.
$ python3 -m PIL
/usr/bin/python3: No module named PIL
…

$ sudo python3 -m pip install --upgrade pip
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
…
$ sudo python3 -m pip install --upgrade Pillow
…

$ python3 -m PIL
  …

See also

torchvision.transforms.ToTensor

Index