How to Create .exe Executable Files from Python Apps and Games using the PyInstaller Module!

preview_player
Показать описание
This video shows how to turn python apps or games into executable .exe files using the python pyinstaller module. We start by installing the pyinstaller module using pip, then convert and package a .py pygame file into one condensed executable file!

I also show how to include images and sound files in your games and how to appropriately structure the folders for your project!

Check out my personal channel for more fun science content!

Love the content on this channel? Feel free to support me on Patreon!

Be sure to check out the channel for tons of other great tutorials and content, and leave a like on the video, subscribe to the channel and let me know in the comments what you'd like to see next!

Thanks for watching and good luck with your projects!
Рекомендации по теме
Комментарии
Автор

Amazing explanation! I was lost in all hose instructions but you cleared it up for me!

RedAlphImmortal
Автор

Thank you soo so much - you are so good at teaching - I scoured the internet for a solution like yours but this is by far the best - people were saying you need to add path environmental variables and what not - I didn't even know terminal access was available in pycharm - Thank you so much

phoenixflower
Автор

so clear explanation really thank you LeMaster Tech!!!

urizemc
Автор

NOTE: i didnt use a GUI for a python project, just inputs and outputs from the terminal ect, and using the "--windowed" command meant it couldnt run. So if your having issues try removing it 🙃🙃

pauloconnor
Автор

pretty nice and usefull, I was strugling with the pyinstaller!!

converti
Автор

This tutorial worked like a charm. Thank you

kardelenkaya
Автор

Nice video, good to know about the info.

pranavnyavanandi
Автор

Hi Le, I have a question. when we package the code and copy it to another computer. Do the target computer also need to install python before running exe? If it must, is there any way to package python along with that app ?

TienHoangManh-rpqt
Автор

Hi there!
Thank you for a clear explanation and an easy guide. Before I try it myself, I have an additionaly qustion. If the programme which I have written is altering directory paths for the sake of its correct execution, will the packaged exe of the programme run correctly on someone else's computer (suppos I send them the exe over email)?
Cheers :)

rexclone
Автор

Great content. Btw what is your background? It's amazing :)

kevinbeuving
Автор

hi, I managed to build the exe but when I run it, the terminal shows a ModuleNotFoundError and closes immediately. In my main.py file, I import several libraries like streamlit and others. How do i solve this ModuleNotFoundError even though I moved the exe file into the main directory? thanks

mzmvclt
Автор

Does the person I send it to have to already have python installed for it to work when they run it? Or will it work on windows 10/11 with just that packed file?

missildine
Автор

Hi after you compiles the .exe file using pyinstaller, did you try run this .exe file in another machine? I got this error doing that 'Bad CPU type in executable' I do not what i need to do in pyinstaller to avoid this

habladoenserio
Автор

Can I use the generated executable file to share the game with others who don't have Python or Pygame installed on their machines?

Samina-lbom
Автор

I have a Django application similarly i have created an .exe file but how to send it to my friends in order to run it without any IDE or python isntalled

sumanthking
Автор

i created the exe file but when i try to run it, it give me the error FileNotFoundError: No such file or directory: the exe is stored in this directory,

uhdofxy
Автор

Have you encounter the problem where your antivirus detecting it as a malicious file? "Operation did not complete successfully because the file contains a virus or potentially unwanted software."

thesuperscout
Автор

Thank you for a clear explanation.
How to build Executable (.exe) file from Python for all Versions of Windows (Seven, 8, 10, 11)
i used PyInstaller in windows 10, but the Executable file compiled by PyInstaller does not work on Windows 7

amusaber
Автор

does this work on mac if you want to create an .exe? or do you need a windows machine?

humbug
Автор

Hey thanks so much for the video! I like how short and to the point it is. I just have one issue though. I have just started coding python and I've been making a script that I want to turn into an exe file. When I turn it into an exe file using pyinstaller and open the exe file it will just loop the first thing in my code, which is registering the script to the startup folder in windows. It keeps doing it until my computer runs out of memory. Not sure why its doing that, as it works as expected when I just run it in pycharm. I'm sure its just some stupid error by me. Any reason or solution on how to fix it? Thanks in advance.

MadmanGamingofficial