How to Convert a Python File to .EXE

  Рет қаралды 57,008

Programming With Nick

Programming With Nick

Күн бұрын

In this video I am going to show you how to convert a python script, a game or a program, into a standalone executable file that will be easy to share with your friends or customers. The procedure is very easy, so let’s start!
For this we are going to use pyinstaller. PyInstaller is a program that converts Python programs into stand-alone executables, under Windows, Linux, and Mac OS. Pyinstaller is very easy to use, and the program turns our code into a single file, which is convenient for distribution.
🏓 Pong Tutorial: • Pong Game Tutorial usi...
🐍 Snake Tutorial: • Snake Game in Python T...
🧱 Tetris Tutorial: • Creating Tetris in Pyt...
👾 Space Invaders Tutorial: • Python Space Invaders ...
🎲Game of Life Tutorial: • Conway's Game of Life ...

Пікірлер: 99
@programmingwithnick
@programmingwithnick Жыл бұрын
I hope you took away lots from this video. Let me know below! PS: I created a course named "Object Oriented Programming Made Easy"! Sign up at programmingwithnick.com/course. Enroll now and a 50% launch discount. The discount ends in a few days.
@Lurkingbird
@Lurkingbird Жыл бұрын
bro i installed pyinstaller by typing "pip install pyinstaller" but when I try to use it it says pyinstaller not recegonised
@yourmarketingbro
@yourmarketingbro 3 ай бұрын
Bro you saved my life life tommorow is my presentation and I wasn't finding any solution to convert .py into .exe.Thank you very very very much.May God bless you for these good deeds of yours.
@novicetech1
@novicetech1 7 ай бұрын
Wow! I spent hours trying to get this to work and it only took 5 minutes following along with you. Thank you, Nick.
@iciclesteve6464
@iciclesteve6464 4 ай бұрын
real
@Copppopop
@Copppopop 11 ай бұрын
Great video! Exactly what I needed and no messing around or padding out for runtime, straight and to the point! Thank you so much!
@programmingwithnick
@programmingwithnick 11 ай бұрын
I am glad it was helpful!
@Pigster700
@Pigster700 Ай бұрын
" 'pyinstaller' is not recognized as an internal or external command, operable program or batch file. " Please help.
@rensius4988
@rensius4988 29 күн бұрын
same
@holy_cheese_man
@holy_cheese_man 28 күн бұрын
cant fix either
@dajidon805
@dajidon805 17 күн бұрын
1 ) click On Windows, search for "Environment Variables" in the Start menu and click on "Edit the system environment variables". Click on the "Environment Variables" button. 2)In the "User variables" section, find the Path variable and select it. Click on "Edit". 3)Click "New" and paste the following path "C:\Users\kakois\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\Scripts" Click "OK" to save the changes. 4)Close and reopen your terminal (Command Prompt or PowerShell) for the changes to take effect. and don't forget to delete pyinstaller by pressings pip uninstall pyinstaller and download it again it works thanks
@somethingoofty5660
@somethingoofty5660 8 күн бұрын
add to path
@masterblaster9925
@masterblaster9925 16 сағат бұрын
same
@AlastairGames
@AlastairGames Жыл бұрын
when I went to "pip install pyi" with CMD it says "pip is not a recognized as an internal or external command..." I think you missed some steps!
@Linexioo
@Linexioo 9 ай бұрын
so install modules u need to open ur python folder and go to propertys on ur python version and then u cope every thing behind python .exe so for me it would be "C:\Users\aaaaaaap\AppData\Local\Programs\Python\Python310\ then u open cmd as admin and do cd ur thing you just copied then u do cd scripts and pip install from there
@hasthij2835
@hasthij2835 6 ай бұрын
Use code: py -m pip install pyi . this worked for me
@XtecherPY
@XtecherPY Ай бұрын
pip is not a command itself its attached to python real command would be "python3 -m pip install pyi"
@briangoodman9344
@briangoodman9344 2 жыл бұрын
Mine doesn't work. I coded a small 1 kilobyte python source code with the modules turtle, random, and time. When I follow the tutorial very carefully, it tells me that pyinstaller wasn't found. I installed pyinstaller. Do you think there is a way to fix this?
@programmingwithnick
@programmingwithnick 2 жыл бұрын
Your computer does not know where to find the pyinstaller executable. Check this to see if any of the solutions do the trick for you: stackoverflow.com/questions/45951964/pyinstaller-is-not-recognized-as-internal-or-external-command?noredirect=1&lq=1
@EliJohnson-f4v
@EliJohnson-f4v Ай бұрын
@@programmingwithnick Thanks!
@NoobStuff2007
@NoobStuff2007 5 ай бұрын
i was using multiple libraries like custom Tkinter and pillow but, when i convert it to .exe, it doesn't locate the library. can you help me ? thanks
@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.
@momentx282
@momentx282 Жыл бұрын
same here
@vIP.bLACK444
@vIP.bLACK444 Жыл бұрын
add the path were all your python scripts are as environmental variables
@metasploitness1927
@metasploitness1927 9 ай бұрын
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.
@Pigster700
@Pigster700 Ай бұрын
@@metasploitness1927 litteraly no one asked for this this is about pyinstaller
@minionsmemesongs4146
@minionsmemesongs4146 5 ай бұрын
its saying the comand pyinstaller is not reconised
@C_a_p_p_l_e
@C_a_p_p_l_e 2 ай бұрын
same
@gamingplayinglearing
@gamingplayinglearing 2 ай бұрын
same
@C_a_p_p_l_e
@C_a_p_p_l_e 2 ай бұрын
@@gamingplayinglearing i found a better tut: kzbin.info/www/bejne/rnukfmuVgd1oo7s
@Hellhorde.
@Hellhorde. 2 ай бұрын
same
@Hellhorde.
@Hellhorde. 2 ай бұрын
GOT IT GUYS run this in CMD first. py -m pip install pyinstaller then do as he says, just follow along exactly as he says. if it is still not working reinstall python and make sure pip is checked and the other needed options.
@zurcloveslocking
@zurcloveslocking Жыл бұрын
pyinstaller is not recognized as an internal or external command do you know how to fix this issue?
@mikhailwebb8377
@mikhailwebb8377 10 ай бұрын
Unfortunately it cant be fixed. The Python Community has not solved this issue as yet. And the videos online claiming that they've fixed it are lying for views.
@metasploitness1927
@metasploitness1927 9 ай бұрын
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.@@mikhailwebb8377
@ruiliang6819
@ruiliang6819 5 ай бұрын
pip install it
@BlackFenix-jz5rs
@BlackFenix-jz5rs 4 ай бұрын
​@@ruiliang6819yeah, that doesnt work
@leonytgames
@leonytgames 4 ай бұрын
@@ruiliang6819 well it is installed thats my problem here
@minionsmemesongs4146
@minionsmemesongs4146 5 ай бұрын
python -m PyInstaller that code can also work ps thanks for the fid do u know how u can make it so someone with a mac can also open it ?
@exro2166
@exro2166 Жыл бұрын
I love the work you did. I have an issue i cant open the dist file even after converting from python file to .exe why is that happening please
@Tims_Projects
@Tims_Projects 2 жыл бұрын
Thankyou Nick, that was great. Now how long have I been using windows and typed cmd after clicking the start button then navigating to the folder, OMG, slap myself on the head, typing it in the navigation bar is new to me ha-ha, thank you for that tip also.
@programmingwithnick
@programmingwithnick 2 жыл бұрын
Glad it helped!
@aliakbarakbari3802
@aliakbarakbari3802 Жыл бұрын
Hi Nick, thanks for the video, I followed all the steps, but I am getting " PermissionError: [Errno 13] Permission denied:" did run cmd as admin, and I have full right (full control/modify, read,write...) over the folder where my .py file is located. any idea? thanks
@FunnehmeGames
@FunnehmeGames Ай бұрын
'pyinstaller' is not recognized as an internal or external command, operable program or batch file. and i know it was succefully installed using --version
@oldfoxtrap31311
@oldfoxtrap31311 2 ай бұрын
All programming languages ​​contain a command to create an executable file. Why does Python not have this command? Is there a deficiency in the program?
@juanm3058
@juanm3058 Ай бұрын
it works super well thank you so much!
@SimTekGameDevelopment
@SimTekGameDevelopment 2 ай бұрын
That was an excellent video!
@QuransGems-zd1jd
@QuransGems-zd1jd 3 ай бұрын
'pyinstaller' is not recognized as an internal or external command, operable program or batch file. ! What to doo!
@avejst
@avejst 2 жыл бұрын
Great video as always 👍 Good walk-through of the process Thanks for sharing your expirence with all of us 👍 😀
@programmingwithnick
@programmingwithnick 2 жыл бұрын
My pleasure!
@bluenoob4078
@bluenoob4078 Жыл бұрын
Nice vid i didn't think this would work but you earned a sub
@programmingwithnick
@programmingwithnick Жыл бұрын
Glad I could help
@lillii9119
@lillii9119 9 ай бұрын
It gives me errors that look like this: 3407 WARNING: Library not found: could not resolve 'api-ms-win-crt' And when I open the exe file it closes immediately
@s2flyiscool2
@s2flyiscool2 Ай бұрын
'pyisntaller' is not recognized as an internal or external command, operable program or batch file.
@milan957
@milan957 9 ай бұрын
Very useful and detailful. Thank you!
@BitsNBytes_
@BitsNBytes_ Жыл бұрын
If I may ask, can I get your Desktop background, I hella like it!
@programmingwithnick
@programmingwithnick Жыл бұрын
Sure, here it is: gr.pinterest.com/pin/15199717481111447/
@puranjayraikwar4235
@puranjayraikwar4235 3 ай бұрын
BRO I FUCKING LOVE YIU, YOU FIXED MY PROBLEM, I WAS TRYING FOR OVER 2 DAYS, THANKYOU BRO
@totalblade5864
@totalblade5864 3 ай бұрын
what the fuck
@Maxib226
@Maxib226 2 күн бұрын
ummmmmmmmmmm my program says import error bc it can't find the external libs
@zidaanahmad_
@zidaanahmad_ Жыл бұрын
Sir how to make executable if I have some dependencies like pandas, face recognition etc ?
@RonalRomeroVergel
@RonalRomeroVergel Жыл бұрын
doesn't work bro... can you help me?
@vegaselements
@vegaselements 2 жыл бұрын
Thanks for you... I have questions... After make it the file not work ... massage no module named talib.abstract While the file is working normally within the working environment pycharm
@programmingwithnick
@programmingwithnick 2 жыл бұрын
I don't know what went wrong in your case. I found a similar case when searching online: stackoverflow.com/questions/67675751/i-am-getting-failed-to-execute-script-main-when-i-double-click-on-the-exe-file I don't know if it helps.
@programmingwithnick
@programmingwithnick 2 жыл бұрын
and this: stackoverflow.com/questions/56088674/modulenotfound-error-while-executing-a-package-created-by-pyinstaller-on-windows?rq=1
@vegaselements
@vegaselements 2 жыл бұрын
Thanks pro .. i will try
@aryelpanda
@aryelpanda 4 ай бұрын
can you do a video on how to do this but with c++ and raylib?
@Cc99XYT
@Cc99XYT Ай бұрын
Why not just use a .pyw file so that the console doesn't show up instead?
@metasploitness1927
@metasploitness1927 9 ай бұрын
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.
@programmingwithnick
@programmingwithnick 9 ай бұрын
Thanks for this helpful comment!
@Chavo1991
@Chavo1991 7 ай бұрын
did'nt worked
@Alexandros.Deligiannis
@Alexandros.Deligiannis 2 жыл бұрын
Καλησπέρα σας, είναι φανταστικά και με μεγάλο ενδιαφέρον τα βίντεο που ανεβάζετε!!! Ειδικά αυτά με το arduino στο άλλο κανάλι που έχετε. Υπάρχει τρόπος να επικοινωνήσουμε μαζί σας?
@programmingwithnick
@programmingwithnick 2 жыл бұрын
Ευχαριστώ πολύ για τα καλά σας λόγια!
@abdallahmali9336
@abdallahmali9336 8 ай бұрын
The converting steps take a long time more non stope converting time do you have a solution
@razarajpoot9811
@razarajpoot9811 Жыл бұрын
ohh such a great and easy explaination. Very amazing, like and sub done🥰
@programmingwithnick
@programmingwithnick Жыл бұрын
Thank you so much 🤗
@apo_0884
@apo_0884 Ай бұрын
Ωραίος!
@basry87878
@basry87878 3 ай бұрын
i created the .exe file but the program isn't being executed suceesfully
@EliseyzScripts
@EliseyzScripts 7 ай бұрын
Thank you very much!
@justkidding-2023
@justkidding-2023 5 ай бұрын
how can we change the logo of exe file
@monnichoudhory4406
@monnichoudhory4406 Жыл бұрын
Keep going brother.
@programmingwithnick
@programmingwithnick Жыл бұрын
Thank you, I will
@venkatyalamati3285
@venkatyalamati3285 6 ай бұрын
Thank you!!!
@chatgptowner
@chatgptowner 4 ай бұрын
You are so good
@vic.1
@vic.1 10 ай бұрын
thank you so much
@namedontknow9377
@namedontknow9377 Жыл бұрын
amaizing😍
@marios_118
@marios_118 Жыл бұрын
emm nice job! telios
@aquaslegocreation9209
@aquaslegocreation9209 6 ай бұрын
my exe file close automatically please help me sir
@ΔημήτρηςΣτεργίου-μ4κ
@ΔημήτρηςΣτεργίου-μ4κ 5 ай бұрын
Your code has error
@orthodoxia32
@orthodoxia32 Жыл бұрын
εισαι ελληνασ σωστα?
@programmingwithnick
@programmingwithnick Жыл бұрын
σωστά
@uoyOS
@uoyOS 5 ай бұрын
it didnt work
@ArcticHorizon
@ArcticHorizon 4 ай бұрын
I don't understand anymore I just want to upload my shit to github to document my progress learning python how the fuck do I get pip what are these commands where do I put them I don't get it anymore
@Alex-kr1ns
@Alex-kr1ns 4 ай бұрын
Just breath, lol. If you haven't figured it out yet, you have to add the directory for pip in the pc properties options. Look up in the cortana search bar "environment variables", go down to system variables, new, and add the scripts folder for your python directory which is usually in C:\Users\x\Appdata\Local\Programs\Python\Python311\Scripts. Restart your pc and cmd is able to access the pip command.
@zoranzoki5652
@zoranzoki5652 Жыл бұрын
it does not work
@thesciencedude1900
@thesciencedude1900 3 ай бұрын
Pyinstaller gave me a Trojan according to Windows defender. So yeah, be carefull
@jacobingle4843
@jacobingle4843 3 ай бұрын
thank you so much!
Convert Tkinter Python App to Executable (.Exe) File [pyinstaller]
9:11
Code First with Hala
Рет қаралды 153 М.
How to Convert Any Python File to .exe? | GeeksforGeeks
10:53
GeeksforGeeks
Рет қаралды 47 М.
😜 #aminkavitaminka #aminokka #аминкавитаминка
00:14
Аминка Витаминка
Рет қаралды 726 М.
Mom had to stand up for the whole family!❤️😍😁
00:39
Convert GUI App to Real Program -  Python to exe to setup wizard
23:27
Python Simplified
Рет қаралды 531 М.
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 719 М.
How To Create An Executable Python Program
3:48
Taylor's Software
Рет қаралды 4,6 М.
Malware development 101: Creating your first ever MALWARE
28:00
Leet Cipher
Рет қаралды 362 М.
Python py to exe 🏃
3:43
Bro Code
Рет қаралды 88 М.
25 nooby Python habits you need to ditch
9:12
mCoding
Рет қаралды 1,8 МЛН
Can I Run Youtube Entirely From My Terminal? (No Browser)
15:31
Convert Python Files To EXE using PyInstaller | PyGame Tutorial
4:25
Coding With Russ
Рет қаралды 92 М.
Convert py to exe - from code to software
5:55
Python Simplified
Рет қаралды 477 М.
Get Started in pygame in 20 minutes!
21:56
Programming With Nick
Рет қаралды 1,7 М.