This is the code from the tutorial on youtube where we create the snake game in Python using the Pyxel engine.
Check out the tutorial here
You can use the pyxel tool pyxelpackager
You will need PyInstaller installed to do this
pyxelpackager main.py
When the process is complete, a stand-alone executable is created in the dist
folder.