S
S
Shroud228lol2020-06-14 11:06:57
Python
Shroud228lol, 2020-06-14 11:06:57

Python program not working?

There is a game in pygame. In it, respectively, a lot of files are loaded, different music, sprites, background, etc. I write first
cd C:\Users\User\Desktop\game
Everything is ok. Then I write:
pyinstaller -F -i "icon.ico" game.py
Everything is OK, too, download, compile and you're done.
I go to dist, open the program and ... The program itself starts, but the files are not loaded, it just says:
couldn't open L1.png
When I run a program that is not compiled, then everything is OK

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2020-06-14
@SoreMix

Compiling python to .exe is a crutch.
Read how to package resources
https://stackoverflow.com/questions/54210392/how-c...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question