Search code examples
pythonpython-3.xcx-freezepython-3.7pysimplegui

How do I fix an Error when Freezing Python 3.7 Script using cx_Freeze


I am trying to create a standalone executable with my python script using cx_Freeze. This is the error I am getting: error: [Errno 2] No such file or directory: 'C:\\Program Files\\Python37\\tcl\\tcl8.6'

Does this have anything to do with using a module such as PySimpleGUI? I am using PySimpleGUI 3.1.2.

How do I fix this?

Here is my code (setup.py and Track_Companion.py).

Note: Track_Companion.py is not yet finished.


Solution

  • Instructions for making .EXE files from programs using PySimpleGUI can be found in the docs here.

    To create the .EXE:

    pyinstaller -wF yoursourcefile.py

    I would upgrade your PySimpleGUI package prior to doing it.