Pyinstaller exe file is not working .

39 views
Skip to first unread message

Ansar M

unread,
Feb 21, 2024, 4:52:45 AMFeb 21
to PyInstaller
After converting my Python script into an executable (exe) file using PyInstaller, when I click on the exe file, it does not open. Upon checking the './script_name', I encounter a 'module not found' error.

The error was:
Traceback (most recent call last):
  File "cyllo_installer.py", line 23, in <module>
ModuleNotFoundError: No module named 'tkinter'
[123032] Failed to execute script 'cyllo_installer' due to unhandled exception!

bwoodsend

unread,
Feb 21, 2024, 5:03:26 AMFeb 21
to PyInstaller

Top level ModuleNotFoundErrors normally mean you’re running PyInstaller from the wrong Python environment. Try running your original Python code from a terminal using python cyllo_installer.py and then building from that same environment using python -m PyInstaller cyllo_installer.py. One of those two commands should fail — depending on which one fails will tell us where you’ve gone wrong.

Reply all
Reply to author
Forward
0 new messages