Error "No module named PIL" during running start script
tankist-git-2 opened this issue · 5 comments
After I run "start" script I've got the error:
No module named 'PIL'
I can easily run python shell and import that module like "import PIL" and it's ok, but the script doesn't see that module. I tried Windows 10 (PC, Python 3.12) and Ubuntu 22.04 (Orange Pi 5, Python 3.10) and I have same problems.
@tankist-git-2 Please follow the installation steps.
https://youtube.com/watch?v=331QGLNY4sU
I'm still having the same error, any help? Ive followed the video
It looks like the PIL version that is used in this branch has been deprecated.
In order to resolve it, I had to completely uninstall current version of python and re-install the older version (version 3.11) as that contains the LIB version that is used in this package.
Make sure to update the environment settings to point to the older version of Python as mine didnt update and I had to manually update it.
@tankist-git-2 if you are using Python 3.12+, assuming you starting from beginning, try changing the line in requirements.txt starting with "Pillow" to "Pillow==10.4.0". you might also want to change "mediapipe" to "mediapipe==0.10.13". then run install.bat. it should give no error.
EDIT:
actually nevermind. the setup finish without error but starting will still give error. you need to use python 3.11.
It looks like the PIL version that is used in this branch has been deprecated. In order to resolve it, I had to completely uninstall current version of python and re-install the older version (version 3.11) as that contains the LIB version that is used in this package [...]
Latest supported version of Python is indeed 3.11 - so simply use that in venv environment and all works according to spec. No need to uninstall 3.12. Simply open a powershell instance and (after installing 3.11) do;
python311 -m venv D:\A-Dev\Python\My311Env
Then activate the venv when inside the dir
.\Scripts\activate.ps1
Then go ahead and install according to docs.