Skip to content

Pyinstaller troubleshooting

ThePromidius edited this page Feb 12, 2024 · 2 revisions

Collections of issues found when building with pyinstaller.

ImportError: cannot import name 'ImageFont' from 'PIL'

hiddenimports = ["FMD3","PIL.ImageFont","PIL.ImageDraw"]

Exception: Class "tkinterweb.HtmlFrame" not mapped

If using spec file:

from PyInstaller.utils.hooks import collect_all
datas = []
binaries=[]
collects = [collect_all('tkinterweb'), collect_all('pygubu')]
for ret in collects:
    datas += ret[0]
    binaries += ret[1]
    hiddenimports += ret[2]

(Will be updated with more info. just wanted to note it as i'm troubleshooting)

Clone this wiki locally