pyinstaller no module named 'PIL'??? | Sololearn: Learn to code for FREE!


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'

2/28/2021 12:31:39 AM


5 Answers

New Answer


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.

+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


what is an exercise file?


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).


IDK, Pyinstaller for TK may depends on PIL and you must install it ASAP