#πŸ”’ converting pygame(.py) to executable(.exe)

14 messages Β· Page 1 of 1 (latest)

hollow patrol
#

hey guys i need help with converting my code into an .exe (not for malisious reasons ofc), my code is consistant of 2 folders with 2 .py files, one being the main title that will activate the game and the other the game, it also uses png's and mp3's. i tried looking it up and tried using pyinstaller, py2exe, auto-py-to-exe. but nothing works, i also tried reinstalling python and updating it. if you can help me it would be great but i dont mind if this would be too much yapping of me and too complicated. -eeuwa

stuck patioBOT
#

@hollow patrol

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

hollow patrol
#

pls tag me if you have a (posible) solution

nimble aspen
umbral echo
#

Do you get an error? Does it not run?

hollow patrol
#

i never got it to open porperly, i had to doubleclick the run file cuz if i type python in the cmd in the correct location it shows an error, it does tell em its installed but it doesnt run the pyinstaller.

umbral echo
#

You didn't get pyinstaller to open?

hollow patrol
#

yes

#

when i type pyinstaller (file) or python pyinstaller (file), i also tried other commands but i forgor

tardy geode
#
pyinstaller -F main.py
```is the default command for 1 file
#

there are also ways to import assets allong your exe by using the dir option

stuck patioBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.