pyinstaller no module named 'PIL'??? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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
4 Answers
+ 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.
28th Feb 2021, 6:59 AM
ChaoticDawg - avatar
+ 1 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 - avatar
what is an exercise file?
28th Feb 2021, 4:41 AM
Wilbur Jaywright
Wilbur Jaywright - avatar
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