Hey guys! How's it going? In this video I'll be showing you how to create a .exe in Pycharm using Python. Cool right? Let me know how it goes in the comment section below!
Пікірлер: 322
@cuaitzzz3 жыл бұрын
if you want to save but don't want the giant cmd window opening every time you run the file just add "--noconsole" after "--onefile"
@Sol4rOnYt2 жыл бұрын
or -w
@LuffyPortal2 жыл бұрын
or -w
@kyleb33162 жыл бұрын
or -w
@coldblaze60012 жыл бұрын
or -w
@fire_for_real12 жыл бұрын
or --windowed
@alessandroricci42232 жыл бұрын
Why can't people makes simple videos that work like yours? So gud, thank you maan
@kamsiosuachalla2 жыл бұрын
You are a hero, thank you a bunch . I had just commented on a similar video but with an approach towards cmd and I kept on getting errors. Once again nice video
@abidmorshed59807 ай бұрын
Short, effective, right on point. Thank you for this video man!
@kryurt Жыл бұрын
to do this in the newer versions you have to 1) Install python to path and add to environment variables (WEB NOT MICROSOFT) 2) Open cmd 3) Type "cd (your code location)" make sure to remove the parenthesis and quotes 4) Now just follow the video but type the commands in cmd 5) If your game crashes on start, drag all the necessary files such as pictures into the "dist" folder 6) OPTIONAL: add -w after --onefile to have the cmd prompt off 7) Don't call me a nerd thanks
@hackqdd Жыл бұрын
I Don't have any necessary files but it still closes.
@kryurt Жыл бұрын
@aadityanalam7655 idk then you should try reinstalling python
@hackqdd Жыл бұрын
@@kryurt ty, but I've fixed it, i just re-made the code deleting sum extra code and re-formatted it.
@kryurt Жыл бұрын
@@hackqdd nice
@blabberbub733 Жыл бұрын
I've got a lot more dependencies. Multiple tkinter windows via button prompts from a single one. Added all the dependencies to the same folder. Still crashes lol
@justbelieve97542 жыл бұрын
I thanks by heart. Finally this video after watching a lot of other videos. Thanks a lot Sir.
@Noel_VI Жыл бұрын
simple and effective video, but I'm kinda curious if the program will still work if I don't install certain libs when using it's exe in another computer. help is greatly appreciated and again a very nice video, keep up the work.
@BhajansAshwin Жыл бұрын
Short precise and extremely helpful Thanks
@velazqg Жыл бұрын
Thanks for the info BTW, sometimes python .exe files close immediately, if that happens use this command at the end of the program. input("Press enter to close program")
@jimfallowfield70283 ай бұрын
Exactly what I was looking for and very concise. Thank you sir!
@BravoTechAI Жыл бұрын
SBU - Simple But Useful tutorial. Marvellous!
@nenesinam3005 Жыл бұрын
I suggest making this a short so many others can view, but a GREAT video
@MartinoDeanMusic3 ай бұрын
Great tutorial, very practic and easy to understand! Thanks!
@amanxo112 күн бұрын
literally my favourite video ever. thanks
@michaelsteeves39144 ай бұрын
If you're having a problem with Windows Defender blocking/deleting your exe file, I found that using --onedir instead of --onefile fixed my issue. Would be nice to have it in one exe but this worked for me
@sushantpawar370311 ай бұрын
Great vid thanks, What to use for production level?
@the4thdimention443 Жыл бұрын
i just finished my first pythom project : ) I'm so happy!
@noodlesnramen2 ай бұрын
i love using *pythom*
@Sorenda1goat2 жыл бұрын
Thank you so much bro your a life saver
@paulfitch9597 Жыл бұрын
Worked perfectly sir. Thank you.
@kevinfoendoe69873 ай бұрын
Great straight to the point video. Will that exe work on a different computer?
@longbeach225 Жыл бұрын
Much easier than using freeze. Freeze you have to put in a lot of parameters to convert into executable.
@mstudios73406 ай бұрын
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. At line:1 char:1 please help
@metasploitness19276 ай бұрын
How to Solve: 'pip' is not recognized as internal or external. 1. My computer > Right Click > Properties 2. Advanced System Configurations 3. Environment Variables 4. Select the "Path" variable and click "Edit" 5. Select "New" and paste the folder path for the python "scripts" folder (In my case, the folder is located in: C:\Users\MC Don Juan\AppData\Local\Programs\Python\Python311\Scripts) 6. After that, click "OK" and "OK" 7. Go to the cmd and type pip install pyinstaller and everything should work correctly now.
@Judeinator900110 ай бұрын
If it is not working for you, you have to click the little arrow right by the plus in the terminal, click "command prompt", and then do it again. That fixed it for me.
@jacobringgaardmikkelsen51033 күн бұрын
What do you recommend to program analytical calculators for internal professional use?
@adnankhan-uf3pg11 ай бұрын
that was the simplest way to create an exe file... amazing...
@LeZinZin95 Жыл бұрын
Very useful, thank you!
@williamyung10692 жыл бұрын
Would you help me! During the process, the pycharm states "AttributeError: Module 'PyQt5' has no attribute '__version__'". I find that there is no PyQt5. Once I go to install PyQt, it was stated the "conda" is failure. The conda can not be installed in terminal too. Thanks
@habibhussainhabib89712 жыл бұрын
will it run in other PCs not having anytime of libraries we used in project.
@phirum57002 жыл бұрын
it is fast and simple Thank!!
@shridharkumbhar9663 Жыл бұрын
thank you so much bro .. helped me alott
@AhmadRizviYT Жыл бұрын
for those whose exe file is giving error, try to move your exe file outside of dist folder with other python files
@jusepie5713 Жыл бұрын
: 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. Can someone help me please I installed pyinstaller on both cmd and terminal
@alexangele2065 ай бұрын
Need to add it to your path in advance system settings: environment variables. Chatgpt helped me troubleshoot from there when i ran into this
@pincer28852 ай бұрын
its kinda late but did you fix it? if so how
@Melody_Boi_PiyushАй бұрын
@@pincer2885 Check the path where pyinstaller is installed, from there copy that module and both your program and the pyinstaller module in same file
@marvinaceroque37906 ай бұрын
pyinstall: The term 'pyinstall' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. how to fix this?
@theinner_drive Жыл бұрын
thank you so much you helped out alot🥰
@shreyas_._2 жыл бұрын
Then what method is using when in terms of production
@kikyou8349 Жыл бұрын
do i need to keep the build or i can directly take the exe and it will run on pc without python installed on it ?
@cityisbetter Жыл бұрын
if u try to install it on different pc, it shows it could be malware and windows try to stop it from running. Is there anyway to make it so windows wont distrub it pls
@DeusAutemEstInanis9 ай бұрын
How would I be able to give a onefile executable permissions to write files? I’m making a text adventure that requires writing files for .json saves, since the basic command I learned was only good for one save named “GameData.json” My saves are assigned a number after “save_” (“save_1.json”, “save_2.json” … etc.)
@rizall72543 жыл бұрын
🔥
@mariarose4443Ай бұрын
hi i have an bug with this when i open the exe its supposed to enter some information but after i press enter or whenever i open the exe and press enter the window closes so i cant get the result which i want i tried modifying to the code so it displays the result in a notepad file but the window closes to fast to even create a notepad file pls help
@The_CookieHacker20 күн бұрын
great video!
@dragondg6412 Жыл бұрын
what if it says 'pyinstaller' is not recognized as an internal or external command, operable program or batch file.
@metasploitness19276 ай бұрын
How to Solve: 'pip' is not recognized as internal or external. 1. My computer > Right Click > Properties 2. Advanced System Configurations 3. Environment Variables 4. Select the "Path" variable and click "Edit" 5. Select "New" and paste the folder path for the python "scripts" folder (In my case, the folder is located in: C:\Users\MC Don Juan\AppData\Local\Programs\Python\Python311\Scripts) 6. After that, click "OK" and "OK" 7. Go to the cmd and type pip install pyinstaller and everything should work correctly now.
@Duas-and-Remembrance Жыл бұрын
Hi i make a project that open cam and detect the face on cam and it work very good, when i make it as exe file the exe file open the windows then close it immediately close, can you tell me what to do. thank you
@SuperBro112Lol4 ай бұрын
pyinstaller: The term 'pyinstaller' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
@prayag_pawar2 ай бұрын
Hey i mean i created onefile but it works only the computer which has python installed in it or has that specific library which is in my main code rasterio library how to create onefile which can run without a python on a computer or like create a installer which will first install python
@sin3divcx9 ай бұрын
The executable file works at a pc without python installed nessesarily,right?
@discotrain1732 жыл бұрын
In Pycharm, if I go to File>>Settings>>My Project Folder>>Python Interpreter, it says I have pip installed. However, if I type "pip install pyinstaller" in the Terminal, it says "pip" is not recognized as an internal or external command. Do you know what I am doing wrong? Edit: I had to fix the path in Environment Variables
@MarkusHelgason Жыл бұрын
@Unkown Make sure you have the path to the scripts of your installed version of python added into Path in your system environment variables (i.e. C:\Users\...\Python\Python310\Scripts ) This solved the problem in my case
@idanavni_ Жыл бұрын
@@MarkusHelgason how do you do that?
@MarkusHelgason Жыл бұрын
@@idanavni_ In the System dialog box, click Advanced system settings. On the Advanced tab of the System Properties dialog box, click Environment Variables. In the System Variables box of the Environment Variables dialog box, scroll to Path and select it.
@d.bruggink7949 Жыл бұрын
@@MarkusHelgason System dialog box of what? How do i get there?
@MarkusHelgason Жыл бұрын
@@d.bruggink7949 If you are using Windows then you can start by opening the control panel, from there you can access the Advanced System Settings and so on
@Leo1979993 жыл бұрын
Thank you very much!!!
@kevinstern24902 жыл бұрын
Hi there. Thanks for the video, it's very useful and well explained. I am having the exact issue you described with antivirus progs. I'm new to Python, so forgive my noobness. If this is not the best way, what is the preferred method to share a script with somebody who does not have python installed on their system like a client or boss ?
@neptunes98522 жыл бұрын
converting it to exe will skip the installation of python
@kevinstern24902 жыл бұрын
@@neptunes9852 thanks ! Does this mean I will have to help set exception for anyone who gets the alert in their antivirus from the exe ? I might just make them all install python. 😂
@neptunes98522 жыл бұрын
@@kevinstern2490 was thinking same , but yea windows says script files as virus
@kurdishlearner31682 жыл бұрын
@@neptunes9852 Install Python and all the modules used in your script manually, and then when you convert the program to exe the pyinstaller will automatically convert everything needed to run the program on other computers who don't have Python.
@saatwikcodz6203 Жыл бұрын
@@kurdishlearner3168 Can you say In detail
@tazulislam2698 Жыл бұрын
I have deployed an app in this way, It showes file missing error if it's source file change path/directory. I need a parmanent solution.
@gallordi2 ай бұрын
So if i run the exe on another compute does it need to have the same packages installed
@noahrowe77306 ай бұрын
Perfect! Using this to kill and restart explorer.exe whenever my taskbar freezes
@Interesting111 Жыл бұрын
the second command, pyinstaller [file name] --onefile, doesn't work for me. Even after i type the first command, pip install pyinstaller. I keep getting an error saying, "The term 'pyinstaller' is not recognized". Waht do I do?
@dick_puncher Жыл бұрын
1st, get good grammer
@Interesting111 Жыл бұрын
@@dick_puncher grammar*
@Alchemist102419 ай бұрын
by the way you only need the .exe file, you can get rid of the other generated files and folders
@Gogol5D3 жыл бұрын
Why you dont change the .py to .pyw and than make a shortcut to desktop ?
@javariamalik8475 Жыл бұрын
What if we don't want to use terminal for this process. Is there any other method for it ?
@AbishaiSingh Жыл бұрын
Good explanation. But you mentioned this is not the production way, since on many computers, it will be flagged as virus. So what would be the “official” way to release a software developed in python?
@stickpal Жыл бұрын
You would need to license it. It costs around $100 unfortunately.
@AbishaiSingh Жыл бұрын
@@stickpal What do you mean by licensing it? Need to purchase the tool?
@stickpal Жыл бұрын
@@AbishaiSingh licensing your own app is basically giving the app info about who made it, the organisation behind it etc, I unfortunately do not know for certain how it actually works but It would be better if you look online for a better answer.
@AbishaiSingh Жыл бұрын
@@stickpal Thanks bud
@AshishSingh-sy3gn2 жыл бұрын
Hi there, the .exe generated by pyinstaller is getting detected as a virus by windows defender as well as other antivirus softwares and thus I am not able to execute it. Please help
@DamnBoii123 Жыл бұрын
This happens all the time.
@fstudies69132 жыл бұрын
Hey when I run the pip command my terminal is showing me Erros❌how can I resolve that problem
@------shiv---11023 күн бұрын
Sir I am in class 11 I am learning python program But Whenever I try to open my final file(output), it opens and then closes immediately. I have given the correct file extension (.py) but it doesn't open 😢 Please tell me if you read
@donnypodcast2 жыл бұрын
When I did this, clicking on the icon ran a terminal, which scripted some stuff really quickly and then it closed. There was no prompt for anything and no qr codes. I wonder if it's because my python code had pyautogui commands, including text entry and clicking?
@Preet_1223 Жыл бұрын
after "--onefile" type "--windowed"
@yemoi5379 Жыл бұрын
@@Preet_1223 when i do this i have error: RuntimeError: input(): lost sys.stdin . Have you got any solutions? I use Pycharm on win10
@itsmohitshekhawat8 ай бұрын
have you got the solution?
@rileylecaptain1135 ай бұрын
Cool
@TheWaynestark2 жыл бұрын
How do you do it without pyinstaller because for some reason my pyinstaller wont work
@watimeyur61942 ай бұрын
Does this work with streamlit libary? I made an exe but it displays streamlit libary not found
@ndndjdjdndndnndnsndn62773 жыл бұрын
It says C:/user/my pc name/the name of file not found help
@robertmccully27927 ай бұрын
You would think all programs would come with a one button executable button. Lets see you make that for all programs!
@lidavao54943 жыл бұрын
Men, thank you
@ishaannaolekar3126 Жыл бұрын
great video man
@mabacks Жыл бұрын
Anyone know what if my python code is in a jupyter note book? whats the best was to implement? Thanks in advance
@notarthem2 ай бұрын
can you help me i do pyinstaller after installing it and it says the term pyinstaller is not recognized
@copcilufaranume9 ай бұрын
How can I use the "pyinstaller .py --onefile" command? It says pyinstaller isn't recognized even tho I installed the package! (I'm using vscode anyways)
@ReiBois8 ай бұрын
Same
@uday-tv4re5 ай бұрын
When that exe file share to my friends only some laptops it is opening. In some laptops it is not opening please give me solution
@aminewoo5943 жыл бұрын
Thank you, there's any method to make file save from Windows defender and Windows don't notice as a virus?
@Indently3 жыл бұрын
I googled some solutions and I'm sure there are!
@cozmic33743 жыл бұрын
if you use a hex editor to change the files hexidecimal values then it wont get detected as antivirus' work by checking their database for similar hex strings
@SB-kt5jc3 жыл бұрын
This may be too late but you can always add your files as an exclusion in security
@cjbrown3396Ай бұрын
Hi I faced a problem so when I clicked my executable file it disappeared immediately. I dont know what happen. Can you help plz?
@unyx6969 Жыл бұрын
Hello i have python file with mp3 sound how to convert to one exe file both. please help
@suchismitamohanty9010 Жыл бұрын
But the problem is that if I want to execute in another laptop it is showing path not spcified
@ariyasaccautama59342 жыл бұрын
when i double click main.exe it doesnt opened. why?
@okipatama960811 ай бұрын
hi morning cant u help me after turn python to exe and i open exe, its like not working alwas force close how to fix it
@apoveda2 жыл бұрын
Please what editor is this one.? Thanks.
@justintse4017 Жыл бұрын
Thanks for your help! I have created the .exe, but when I run to line 23 the program closes would you have any suggestions why? Apologies if silly question, new to programming
@Kdawg.9657 Жыл бұрын
im getting an error every where no matter the video saying pyinstaller isnt recognised help????
@cocoak4503 жыл бұрын
I have a problem with distributing exe files made from pyinstaller. How can I make exe file without detected as virus??
@LuffyPortal2 жыл бұрын
You cant, you need multiple people to install it, make it trusted and safe then you can.
@lilibethhuellas62082 жыл бұрын
I cant open the file it gives an alarm in my security how to fix that?
@Abel703 Жыл бұрын
thank you
@angeltalpa84262 жыл бұрын
I have a problem. At the final stage of my program the .exe shuts down. What can I do?
@mrphilly Жыл бұрын
In your script you need to put at the end something like input(" ") with this you gonna have to press a key for it to close
@TCZ112 Жыл бұрын
Gawd bless dis mahn
@caiosardinhadeoliveira1371 Жыл бұрын
this exe file will only run on computers with python, right?
@LucianoFernandezMuruaga2 ай бұрын
hello! it worked, but it doesn't closes after finishing the code or when it finds an error
@Oresti-0073 ай бұрын
Thank you !
@navaneethkrishna1232 жыл бұрын
If I try to open the main.py file it just crashes. Any answers? (thanks in advance)
@ironpanv21242 жыл бұрын
I'm having the same problem and cant find a solution anywhere :_(
@RonalRomeroVergel10 ай бұрын
have u found any solution?@@ironpanv2124
@GGaemer2 жыл бұрын
how would i change the icon?
@erikkovacs54182 ай бұрын
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. i get this error, any fixes?
@MeteorGaming96Ай бұрын
Same problem
@SanthoshShetty-cm9dfАй бұрын
Did you try this with VS Code IDE? Even I got the same problem, when I executed with VS code. Again I tried with pycharm, it's working perfect. I think the isuue is with virtual environment for pyinstaller library in VS code.
@internetprophet_clownАй бұрын
How do you change the icon for the exe?
@kooroshparvaz9441 Жыл бұрын
My program was working but now it shows me the "RuntimeError: cannot open E:\Nordhausen University: Permission denied I wonder if you could help me
@mrphilly Жыл бұрын
help it doesn't work it says that pyinstaller is not a command
@hipockt42 жыл бұрын
Nice!!
@Obey-Njanjeni Жыл бұрын
Thank you a lot, how can i do it for a flask application