Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Need help with converting .py to .exe

A topic by bruh39 created Nov 02, 2020 Views: 394 Replies: 10
Viewing posts 1 to 6
Submitted(+1)

Can someone please help me with converting my game which is made with pygame into a .exe file type, no method i have seen worked for me.

Sure, what part are you stuck on?

Submitted

Everythint, no method of converting seems to work. I made a simple game to test it and nothinf works it either just won't convert or it chrashes when i open the converted file.

Submitted

There's a library called pip-installer that lets you package your .py files into .exe files.

Here's a tutorial on how to use it: 

Submitted

Yeahi know i tried it, when i convert it the converted file only opens the console type part and not the actual pygame window

Submitted

Did you follow the steps correctly? Maybe there's something wrong that you did with the export settings, might wanna double check. Otherwise here's the documentation for pyinstaller (hope it helps)

If this still doesn't help, then I think you ought to try something else.

Submitted

TYSM it worked :D

Submitted

Np :)

if you're on windows, go to your explorer in the folder of your game exe location and type "cmd" then type in your exe name so "gamename.exe" it will show you the debug of what's happening. if you dont understand let me know comment back 

My Sugession is to try making a virtual environment and then write a .exe files. This would literally work on linux since gcc compilers are installed by default but I dont know about Windows in this type of situation maybe you could try this

Have you tried pyinstaller? (I have tested it with pygame) https://pyinstaller.readthedocs.io/en/stable/