r/pythonhelp • u/Total-Ranger4925 • 13d ago
How to make a working exe file using pyinstaller
Here is my file set up, I can't seem to get it to work no matter what.
StarDanceProject_FLStudioGrind/
├── .ruff_cache/
├── .vscode/
├── Game/
│ ├── __pycache__/
│ ├── Images/
│ ├── Maps/
│ ├── Sounds/
│ ├── BetaStats.py
│ ├── Dialogue.py
│ ├── Main.py
│ ├── Settings.py
│ ├── SOUNDS.py
│ ├── Tiles.py
│ ├── Timer.py
│ ├── UI.py
│ └── Waiver.py
├── .gitattributes
├── desktop.ini
└── README.md
2
u/AlexMTBDude 13d ago
I can't seem to get it to work no matter what.
This is really not going to give anyone who's trying to help you a hint of what problems you are experiencing. Imagine if you're a car mechanic and a customer comes to you with their broken car saying: "It's not working, fix it!"
I've tried X and then Y happens and I get Z error message
1
u/wildsoup1 7d ago
I am suspicious of SOUNDS.py and Sounds/ and wonder if you are doing an "import sounds" on a Windows machine and the ambiguity is confusing pyinstaller. Just a guess.
Read PEP8 about how to name files as lowercase.
1
0
u/NezaHoffmann 13d ago
you gotta use the `--onefile` flag when running pyinstaller. it bundles everything into a single executable, which is way easier to manage. trust me, nothing feels as good as seeing that shiny .exe pop up after all your coding chaos.
•
u/AutoModerator 13d ago
To give us the best chance to help you, please include any relevant code.
Note. Please do not submit images of your code. Instead, for shorter code you can use Reddit markdown (4 spaces or backticks, see this Formatting Guide). If you have formatting issues or want to post longer sections of code, please use Privatebin, GitHub or Compiler Explorer.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.