Adam Zarn
Adam Zarn

Reputation: 2100

Pyinstaller Failed to execute script pyi_rth__tkinter on Mac

I'm trying to create a pyinstaller app distribution

pyinstaller --windowed --add-data "folder:folder" --icon=icon.icns MyApp.py

but I'm getting this error:

Traceback (most recent call last): File "site-packages/PyInstaller/loader/rthooks/pyi_rth__tkinter.py", line 30, in FileNotFoundError: Tcl data directory "/Path/MyApp.app/Contents/MacOS/tcl" not found. [55354] Failed to execute script pyi_rth__tkinter

The strange thing is that I'm not using Tkinter anywhere in my application.

Upvotes: 1

Views: 2055

Answers (1)

Adam Zarn
Adam Zarn

Reputation: 2100

I noticed this in the logs as well:

4000 ERROR: Tcl/Tk improperly installed on this system.

And since my app doesn't rely on Tkinter anyway, I changed the pyinstaller command to this which fixed the issue:

pyinstaller --windowed --add-data "folder:folder" --exclude-module tkinter --icon=icon.icns MyApp.py

I'm still investigating how to fix my Tcl/Tk installation.

Upvotes: 2

Related Questions