Running my frozen script stops immediately with this message: 1
Fatal Python error: initfsencoding: unable to load the file system codec.
ImportError: invalid flags 1530064918 in 'encodings'
Current thread 0x00000f94 (most recent call first):
I use Python 3.7.0 and cx_Freeze 5.1.1 (64bit).
My script:
import os
from cx_Freeze import setup, Executable
PYTHON_INSTALL_DIR = os.path.dirname(os.path.dirname(os.__file__))
os.environ['TCL_LIBRARY'] = os.path.join(PYTHON_INSTALL_DIR, 'tcl', 'tcl8.6')
os.environ['TK_LIBRARY'] = os.path.join(PYTHON_INSTALL_DIR, 'tcl', 'tk8.6')
build_exe_options={
'packages':['copy', 'tkinter', 'os', 'pandas',
'numpy', 'scipy', 'csv', 'datetime', 'matplotlib']
executables=[Executable("Data_GUI_11.py")]
setup(name='Data_GUI_11',
version=0.1,
description='Data reader and plotter',
options={"build_exe": build_exe_options},
executables=executables
)
There might be more errors – it is my first attempt with cx_Freeze. No clue…
Thank you.