Convert Python Files To EXE using PyInstaller | PyGame Tutorial

preview_player
Показать описание
In this video I will explain how to package your python files into an executable so you can easily distribute them. I will be using pyinstaller for this and will show a few useful settings that make the process easier.

If you come across an error that says: "Pip is not recognised as an internal or external command" then check out this link for solutions:

Check out my other PyGame tutorials:
Рекомендации по теме
Комментарии
Автор

Ha, I just finished your shooter tutorial and went to another tab of YouTube just to search for a video like this. Without really reading the author, "Oh this one looks promising!" And suddenly it's the voice I just finished listening to. Imagine that lol!

ScherzoVivo
Автор

after days and days of trying to debug the problem, i finally came across your video,
can't thank you enough, you're literally helping me pay my rent. thank you <3

khalilebdelli
Автор

Thanks so much for this! You went in depth perfectly with all of the errors and perfectly explained how to fix them

MaxerDev
Автор

Another very helpful vid, and also thanks again for the quick response, Russ. Btw, are these instructions applicable to Macs as well? Or it doesn't matter --- it works for same for both Macs and Windows? Thanks.

fidelxl
Автор

Love your way of teaching and guiding, man!

baibhabchakraborty
Автор

Thank you Russ!!! My first script has been processed to an executable now. <3

kennethpascasio
Автор

Exactly I was looking for. Now I can make apps using python. Thanks!

star_t
Автор

typical pyinstaller' is not recognized as an internal or external command,
operable program or batch file.

Litfield
Автор

i have been trying to use pyinstaller for like a year straight for this shitty space invaders clone i made and this is the only video that has explained it properly

spoopy
Автор

yes i was one of the people that suggested this video idea!

ZacLangston
Автор

Very helpful, thx! Doubt: The sample game that I used to taste this had the __file__ dir path to get the images. I had to get rid of that and use relative import. Is that the correct way to do it?

famaral
Автор

Holy moly adjusting the PATH to get the pyinstaller command working took some thought. I wonder why it ended up where it did.

khargos
Автор

I would like to ask you what we should do, if we want to access all of our projects in PyCharm on another device after we have installed Windows 11 for example - is it an option to convert all python files into to EXE, put it on a USB and then plug it into the new device?

lobdycq
Автор

Real-time antivirus protections blocks this file from being created as it thinks it contains a virus. Is there a way around this other than simply disabling anti-virus?

dustin
Автор

Does not seem to work on mac if there are other .png files (like the ones you have shown in the example above). Have you tried on mac? Thanks

kashifumer
Автор

Could we bundle the images into the executable itself by using the pyinstaller flag for data?

bengeorge
Автор

I dont know why, but when i type pyinstaller it comes with an error, I do have it installed and i do have a python file. Is this because my game does not the pygame extention or because of a new release of pip??

SmoothBurger
Автор

Hello can you help, when i run the "pyinstaller platformer --onefile --windowed" i get a UPX is not available.

bullitttraders
Автор

failed to execute script 'game' due to unhandled exception: expected str, bytes or os.Pathlikeobject, not BytesIO

failed to obtain/convert traceback!

JuggernautVault
Автор

im making a game engne built on pygame, this is really useful, im gonna try make a python or batch file to automate this

lolhahalaughlaugh