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

+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'

2/28/2021 12:31:39 AM

PolChe

5 Answers

New Answer

+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/python-pillow/Pillow/issues/3851 https://cloudstack.ninja/major-tonality/how-to-manually-add-pil-module-to-pyinstaller-exe/

+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

0

what is an exercise file?

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

0

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