Тёмный
No video :(

How to turn your Python file (.py) into an .exe (Tutorial 2021) 

Indently
Подписаться 202 тыс.
Просмотров 537 тыс.
50% 1

Опубликовано:

 

29 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 334   
@cuaitzzz
@cuaitzzz 3 года назад
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"
@Sol4rOnYt
@Sol4rOnYt 3 года назад
or -w
@NotePortal
@NotePortal 2 года назад
or -w
@kyleb3316
@kyleb3316 2 года назад
or -w
@coldblaze6001
@coldblaze6001 2 года назад
or -w
@fire_for_real1
@fire_for_real1 2 года назад
or --windowed
@alessandroricci4223
@alessandroricci4223 2 года назад
Why can't people makes simple videos that work like yours? So gud, thank you maan
@kamsiosuachalla
@kamsiosuachalla 2 года назад
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
@metasploitness1927
@metasploitness1927 8 месяцев назад
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.
@kryurt
@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
@hackqdd Год назад
I Don't have any necessary files but it still closes.
@kryurt
@kryurt Год назад
@aadityanalam7655 idk then you should try reinstalling python
@hackqdd
@hackqdd Год назад
@@kryurt ty, but I've fixed it, i just re-made the code deleting sum extra code and re-formatted it.
@kryurt
@kryurt Год назад
@@hackqdd nice
@blabberbub733
@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
@michaelsteeves3914
@michaelsteeves3914 5 месяцев назад
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
@user-lx9qq2nc9d
@user-lx9qq2nc9d 11 дней назад
wow that was quick, useful, clear, and effective, it works and that's how tutorials should be. Thank you !
@mstudios7340
@mstudios7340 8 месяцев назад
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
@the4thdimention443
@the4thdimention443 Год назад
i just finished my first pythom project : ) I'm so happy!
@noodlesnramen
@noodlesnramen 4 месяца назад
i love using *pythom*
@Noel_VI
@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.
@justbelieve9754
@justbelieve9754 2 года назад
I thanks by heart. Finally this video after watching a lot of other videos. Thanks a lot Sir.
@velazqg
@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")
@abidmorshed5980
@abidmorshed5980 8 месяцев назад
Short, effective, right on point. Thank you for this video man!
@kevinfoendoe6987
@kevinfoendoe6987 4 месяца назад
Great straight to the point video. Will that exe work on a different computer?
@Judeinator9001
@Judeinator9001 Год назад
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.
@jusepie5713
@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
@alexangele206
@alexangele206 6 месяцев назад
Need to add it to your path in advance system settings: environment variables. Chatgpt helped me troubleshoot from there when i ran into this
@pincer2885
@pincer2885 3 месяца назад
its kinda late but did you fix it? if so how
@Melody_Boi_Piyush
@Melody_Boi_Piyush 3 месяца назад
@@pincer2885 Check the path where pyinstaller is installed, from there copy that module and both your program and the pyinstaller module in same file
@alexela_
@alexela_ 2 дня назад
did ya' fix it? i've got the same issue.
@MartinoDeanMusic
@MartinoDeanMusic 4 месяца назад
Great tutorial, very practic and easy to understand! Thanks!
@rich-LJ
@rich-LJ 18 часов назад
you saved my day. thanks man!
@The_CookieHacker
@The_CookieHacker Месяц назад
great video!
@BhajansAshwin
@BhajansAshwin Год назад
Short precise and extremely helpful Thanks
@SuperBro112Lol
@SuperBro112Lol 5 месяцев назад
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.
@jimfallowfield7028
@jimfallowfield7028 4 месяца назад
Exactly what I was looking for and very concise. Thank you sir!
@BravoTechAI
@BravoTechAI Год назад
SBU - Simple But Useful tutorial. Marvellous!
@amanxo1
@amanxo1 Месяц назад
literally my favourite video ever. thanks
@dragondg6412
@dragondg6412 Год назад
what if it says 'pyinstaller' is not recognized as an internal or external command, operable program or batch file.
@metasploitness1927
@metasploitness1927 8 месяцев назад
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.
@nenesinam3005
@nenesinam3005 Год назад
I suggest making this a short so many others can view, but a GREAT video
@marvinaceroque3790
@marvinaceroque3790 7 месяцев назад
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?
@gkfrm17
@gkfrm17 2 года назад
Thank you so much bro your a life saver
@Interesting111
@Interesting111 2 года назад
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
@dick_puncher Год назад
1st, get good grammer
@Interesting111
@Interesting111 Год назад
@@dick_puncher grammar*
@adnankhan-uf3pg
@adnankhan-uf3pg Год назад
that was the simplest way to create an exe file... amazing...
@navaneethkrishna123
@navaneethkrishna123 2 года назад
If I try to open the main.py file it just crashes. Any answers? (thanks in advance)
@ironpanv2124
@ironpanv2124 2 года назад
I'm having the same problem and cant find a solution anywhere :_(
@RonalRomeroVergel
@RonalRomeroVergel 11 месяцев назад
have u found any solution?@@ironpanv2124
@tekguru6213
@tekguru6213 Месяц назад
Perfect. Thank you sir. 👍
@------shiv---110
@------shiv---110 Месяц назад
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
@sushantpawar3703
@sushantpawar3703 Год назад
Great vid thanks, What to use for production level?
@AbishaiSingh
@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
@stickpal Год назад
You would need to license it. It costs around $100 unfortunately.
@AbishaiSingh
@AbishaiSingh Год назад
@@stickpal What do you mean by licensing it? Need to purchase the tool?
@stickpal
@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
@AbishaiSingh Год назад
@@stickpal Thanks bud
@kevinstern2490
@kevinstern2490 3 года назад
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 ?
@neptunes9852
@neptunes9852 3 года назад
converting it to exe will skip the installation of python
@kevinstern2490
@kevinstern2490 3 года назад
@@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. 😂
@neptunes9852
@neptunes9852 3 года назад
@@kevinstern2490 was thinking same , but yea windows says script files as virus
@kurdishlearner3168
@kurdishlearner3168 2 года назад
@@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
@saatwikcodz6203 Год назад
@@kurdishlearner3168 Can you say In detail
@discotrain173
@discotrain173 2 года назад
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
@MarkusHelgason 2 года назад
@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_
@idanavni_ Год назад
@@MarkusHelgason how do you do that?
@MarkusHelgason
@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
@d.bruggink7949 Год назад
@@MarkusHelgason System dialog box of what? How do i get there?
@MarkusHelgason
@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
@aminewoo594
@aminewoo594 3 года назад
Thank you, there's any method to make file save from Windows defender and Windows don't notice as a virus?
@Indently
@Indently 3 года назад
I googled some solutions and I'm sure there are!
@cozmic3374
@cozmic3374 3 года назад
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-kt5jc
@SB-kt5jc 3 года назад
This may be too late but you can always add your files as an exclusion in security
@copcilufaranume
@copcilufaranume 10 месяцев назад
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)
@ReiBois
@ReiBois 9 месяцев назад
Same
@longbeach225
@longbeach225 Год назад
Much easier than using freeze. Freeze you have to put in a lot of parameters to convert into executable.
@paulfitch9597
@paulfitch9597 Год назад
Worked perfectly sir. Thank you.
@jacobringgaardmikkelsen5103
@jacobringgaardmikkelsen5103 Месяц назад
What do you recommend to program analytical calculators for internal professional use?
@shreyas_._
@shreyas_._ 2 года назад
Then what method is using when in terms of production
@noahrowe7730
@noahrowe7730 7 месяцев назад
Perfect! Using this to kill and restart explorer.exe whenever my taskbar freezes
@milkisbannned
@milkisbannned 2 года назад
says term pip isnt recognised as a name of a cmdlet, function, script file or operable program
@RandomJeevanYT
@RandomJeevanYT 2 года назад
That means pip isn't installed on ur device. Install pip first by another tutorial
@yeppiidev
@yeppiidev Год назад
@@varunramakrishnan7676 yeah on windows 🗿
@varunramakrishnan7676
@varunramakrishnan7676 Год назад
@@yeppiidev Oops
@heshamezz9798
@heshamezz9798 Год назад
I was have the same error And the solotion is :You should install the pyinstaller in the path so system can read it... how to do that first you need to know where is pyinstaller package have been installed so you can reinstall package again and copy the link where it have been installed then follow these steps: 1- from search menu search for(edit the system environment)open it 2- click on (environment variables) 3-chose path 4- click on edit 5-click on new and paste the link where pyinstaller is installed it And finnaly try again it will work
@KEEPER_CRYPT
@KEEPER_CRYPT 10 месяцев назад
@@heshamezz9798 make sure your under the correct directory!!!
@donnypodcast
@donnypodcast 2 года назад
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
@Preet_1223 Год назад
after "--onefile" type "--windowed"
@yemoi5379
@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
@PeoplesPerspectives
@PeoplesPerspectives 10 месяцев назад
have you got the solution?
@robertmccully2792
@robertmccully2792 8 месяцев назад
You would think all programs would come with a one button executable button. Lets see you make that for all programs!
@cityisbetter
@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
@lidavao5494
@lidavao5494 3 года назад
Men, thank you
@futuremartian3193
@futuremartian3193 3 года назад
Hello, why does the "main" file close immediately whenever I'm trying to open it?
@cadea2781
@cadea2781 2 года назад
HEY!, the reason for this is you may need to add a loop or input so it does not close immediately. this script may help closeInput = raw_input("Press ENTER to exit") add this to the end of program. hope this helped
@RonalRomeroVergel
@RonalRomeroVergel 11 месяцев назад
hey buddy is still not working... do you find another solution?@@cadea2781
@shridharkumbhar9663
@shridharkumbhar9663 Год назад
thank you so much bro .. helped me alott
@erikkovacs5418
@erikkovacs5418 3 месяца назад
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
@MeteorGaming96 2 месяца назад
Same problem
@SanthoshShetty-cm9df
@SanthoshShetty-cm9df 2 месяца назад
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.
@kadi34
@kadi34 2 года назад
I 'm on Windows 11 and I've been trying to turn my python file into an executable file but every time I try to open it it just immediately closes. Am I doing something wrong or does it have to do with the Windows 11?
@EpicNoobx
@EpicNoobx Год назад
Try opening CMD, going to the directory the executable is in (cd C:/path/to/folder), and typing the name of the executable. It might be an error, or that you didn't make it wait at the end of execution.
@AhmadRizviYT
@AhmadRizviYT Год назад
for those whose exe file is giving error, try to move your exe file outside of dist folder with other python files
@Abel703
@Abel703 Год назад
thank you
@theinner_drive
@theinner_drive 2 года назад
thank you so much you helped out alot🥰
@LeZinZin95
@LeZinZin95 Год назад
Very useful, thank you!
@angeltalpa8426
@angeltalpa8426 2 года назад
I have a problem. At the final stage of my program the .exe shuts down. What can I do?
@mrphilly
@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
@tobiasmedg6969
@tobiasmedg6969 Год назад
when i do the pyinstaller (filename.py) --onefile it says the file is not found
@iongotchu
@iongotchu 5 месяцев назад
idk either
@ishaannaolekar3126
@ishaannaolekar3126 Год назад
great video man
@phirum5700
@phirum5700 2 года назад
it is fast and simple Thank!!
@praveendesu
@praveendesu Год назад
I installed pyinstaller successfully, but I'm getting this error when trying to convert a python file to .exe. Please help. 'pyinstaller' is not recognized as an internal or external command, operable program or batch file.
@funnelrat2640
@funnelrat2640 Год назад
Having same issue :(
@a3d8ew
@a3d8ew Год назад
same
@mumie_08
@mumie_08 Год назад
same
@__-zv8fw
@__-zv8fw 3 года назад
Any help if the dist folder is empty?
@AlexMuseMatrix
@AlexMuseMatrix 5 месяцев назад
Same
@ndndjdjdndndnndnsndn6277
@ndndjdjdndndnndnsndn6277 3 года назад
It says C:/user/my pc name/the name of file not found help
@AshishSingh-sy3gn
@AshishSingh-sy3gn 2 года назад
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
@DamnBoii123 2 года назад
This happens all the time.
@brok-824
@brok-824 4 месяца назад
User executing the program must also have Python installed. I think 99.9% must have Python installed for the program to run?
@DeusAutemEstInanis
@DeusAutemEstInanis 10 месяцев назад
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.)
@cjbrown3396
@cjbrown3396 2 месяца назад
Hi I faced a problem so when I clicked my executable file it disappeared immediately. I dont know what happen. Can you help plz?
@habibhussainhabib8971
@habibhussainhabib8971 2 года назад
will it run in other PCs not having anytime of libraries we used in project.
@BZ-nb2rh
@BZ-nb2rh Месяц назад
good exmaple, bummer it outputs literally nothing but a .spec file
@potato5697
@potato5697 2 года назад
thanks
@fstudies6913
@fstudies6913 2 года назад
Hey when I run the pip command my terminal is showing me Erros❌how can I resolve that problem
@hikiri5566
@hikiri5566 4 месяца назад
Would this work if I open images in my python using a file paths from my PC?
@TCassiopeia
@TCassiopeia 21 день назад
I cannot move the file, i have admin permissions, but it says access denied.
@Oresti-007
@Oresti-007 4 месяца назад
Thank you !
@mariarose4443
@mariarose4443 3 месяца назад
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
@cocoak450
@cocoak450 3 года назад
I have a problem with distributing exe files made from pyinstaller. How can I make exe file without detected as virus??
@NotePortal
@NotePortal 2 года назад
You cant, you need multiple people to install it, make it trusted and safe then you can.
@kikyou8349
@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 ?
@tazulislam2698
@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.
@prayag_pawar
@prayag_pawar 3 месяца назад
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
@Leo197999
@Leo197999 3 года назад
Thank you very much!!!
@mrphilly
@mrphilly Год назад
help it doesn't work it says that pyinstaller is not a command
@Duas-and-Remembrance
@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
@Alchemist10241
@Alchemist10241 10 месяцев назад
by the way you only need the .exe file, you can get rid of the other generated files and folders
@watimeyur6194
@watimeyur6194 4 месяца назад
Does this work with streamlit libary? I made an exe but it displays streamlit libary not found
@pratham4494
@pratham4494 15 дней назад
worked, tysm
@hipockt4
@hipockt4 2 года назад
Nice!!
@rileylecaptain113
@rileylecaptain113 6 месяцев назад
Cool
@deleteduser36b2cb28
@deleteduser36b2cb28 3 месяца назад
So if i run the exe on another compute does it need to have the same packages installed
@PrakashTuladhar
@PrakashTuladhar Год назад
I followed your instruction. My executable won't run. I am using a mac. Any suggestions? Much appreciate it.
@RonalRomeroVergel
@RonalRomeroVergel 6 месяцев назад
bro did u found any solution for that?
@williamyung1069
@williamyung1069 3 года назад
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
@LucianoFernandezMuruaga
@LucianoFernandezMuruaga 3 месяца назад
hello! it worked, but it doesn't closes after finishing the code or when it finds an error
@notarthem
@notarthem 4 месяца назад
can you help me i do pyinstaller after installing it and it says the term pyinstaller is not recognized
@herbertguate8934
@herbertguate8934 7 месяцев назад
My main file in fist just closes after opening 😢
@STEVENSA_official
@STEVENSA_official 2 года назад
thanx, a lot! 🤝
@kvelez
@kvelez Год назад
Good video.
@llBestBoyll
@llBestBoyll 3 года назад
NICE MAN
@TCZ112
@TCZ112 Год назад
Gawd bless dis mahn
@rizall7254
@rizall7254 3 года назад
🔥
Далее
How Do Hackers Crack ANY Software
5:54
Просмотров 550 тыс.
Real Or Cake For $10,000
00:37
Просмотров 11 млн
5 Good Python Habits
17:35
Просмотров 509 тыс.
The Most Legendary Programmers Of All Time
11:49
Просмотров 553 тыс.
Create A Python API in 12 Minutes
12:05
Просмотров 620 тыс.
How to Convert a Python File to .EXE
4:44
Просмотров 46 тыс.
What's inside a .EXE File?
8:27
Просмотров 424 тыс.
*Next-door 10x Software Engineer* [FULL]
4:50
Просмотров 547 тыс.
Convert py to exe - from code to software
5:55
Просмотров 472 тыс.
10 Important Python Concepts In 20 Minutes
18:49
Просмотров 69 тыс.
25 nooby Python habits you need to ditch
9:12
Просмотров 1,7 млн