i've recently started working with pygame and wanted to create an executable using cx_Freeze but i encounter an error every time i try to run my exe file.
Fatal Python error: initfsencoding: unable to load the file system codec
ImportError: invalid flags 1530097318 in 'encodings'
Current thread 0x000016f0 (most recent call first):
Here's my setup.py file:
import cx_Freeze
import os
os.environ['TCL_LIBRARY'] = "C:\\Python37-64\\tcl\\tcl8.6"
os.environ['TK_LIBRARY'] = "C:\\Python37-64\\tcl\\tk8.6"
executables=[cx_Freeze.Executable('snk.py')]
cx_Freeze.setup(
name='Snake',
options={'build_exe':{'packages':['pygame'], 'include_files':['beep.wav', 'lost.wav', 'apple.png', 'snakehead2.png', 'apple2.png', 'tail.png', 'C:\\Windows\\Fonts\\MAGNETOB.TTF']}},
description='Snake Game',
executables=executables
)
Can someone please help.