+ 1

pyinstaller no module named 'PIL'???

Hello guys, I have a Tkinter interface working properly running with Python, but when I convert to exercise file with pyinstaller, it shows "no module named 'PIL'

28th Feb 2021, 12:31 AM
PolChe
4 ответов
+ 2
A few reasons this may happen. 1. You don't have PIL installed in the version or virtual environment that you're using to build this project. 2. PIL is the incorrect import. Try the following; import Image from PIL import Image import pillow etc. https://stackoverflow.com/questions/8863917/importerror-no-module-named-pil https://github.com/JUMP_LINK__&&__python__&&__JUMP_LINK-pillow/Pillow/issues/3851 https://cloudstack.ninja/major-tonality/how-to-manually-add-pil-module-to-pyinstaller-exe/
28th Feb 2021, 6:59 AM
ChaoticDawg
ChaoticDawg - avatar
+ 1
https://stackoverflow.com/questions/64057842/how-to-manually-add-pil-module-to-pyinstaller-exe also this, in case you use pycharm. we used to make pyinstaller images of our software from 2012 to 2017 but abandoned it in the last years because they would not be truly portable anymore. Many systems would block them after spectre and meltdown. as ChaoticDawg writes, PIL has been replaced by pillow
28th Feb 2021, 8:25 AM
bell
bell - avatar
0
what is an exercise file?
28th Feb 2021, 4:41 AM
Wilbur Jaywright
Wilbur Jaywright - avatar
0
JIC YDK, PIL is an abbreviation for Python Imaging Library, and is not a dependency of Tkinter’s AFAIK (and no i really wasnt trying to use as many acronyms as possible).
28th Feb 2021, 4:42 AM
Wilbur Jaywright
Wilbur Jaywright - avatar