No module named 'PIL'

I did install it with
python3 -m pip install --upgrade Pillow
python3 -m pip install --upgrade Pillow
, but get the above error message at the line "from PIL import Image" when running a VSCodium python script with the Jupyter expansion. I guess it is due to the installation path as Python is in usr/lib? While Pillow is in home/bazzite/.local/lib/python3.13/site-packages/pip (python3.13). And pip is there as well due to running
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade pip
or at least the updated version is. What are the recommended steps to fix this?
1 Reply
random person
random personOP2mo ago
Rebasing to the bazzite-dx and using the normal VSCode along with the recommended extensions worked.

Did you find this page helpful?