Это видео недоступно.
Сожалеем об этом.
Python py to exe 🏃
HTML-код
- Опубликовано: 10 фев 2021
- python convert .py to .exe file tutorial example explained
#python #py #exe
***********************************************************
(Windows Defender may prevent you from running)
(make sure pip and pyinstaller are installed/updated)
1. cd to directory that contains your .py file
2. pyinstaller ...
-F (all in 1 file)
-w (removes terminal window)
-i icon.ico (adds custom icon to .exe)
clock.py (name of your main python file)
3. exe is located in the dist folder
***********************************************************
Bro Code merch store 👟 :
===========================================================
teespring.com/stores/bro-code-5
===========================================================
(Windows Defender may prevent you from running)
(make sure pip and pyinstaller are installed/updated)
1. cd to directory that contains your .py file
2. pyinstaller -F -w -i icon.ico clock.py
-F (all in 1 file)
-w (removes terminal window)
-i icon.ico (adds custom icon to .exe)
clock.py (name of your main python file)
3. exe is located in the dist folder
0. pip install pyinstaller
After typing cmd in a search bar of windows explorer it opens prompt with that directory. Kinda useful i guess?
TYSM, Bro, you really helped me, now I can send my projects to other people, even if they do not have a python :).
Help, I have an error.
pyinstaller : The term 'pyinstaller' is not recognized as the name of a cmdlet, function, script file, or operable
program.
I changed the directory and it never worked, I downloaded it with pip, pip3 and py -m pip
Just nearly find your channel. By watching your video occasionally i starting to luffing )) like your vibe, Bro! 👊
Today I finished writing my first app with this channel. Thank you very much
Mil gracias es súper simple y clara tu explicación.
bro, you are my savior in coding.
ahh yes a very casual "nuclear launch codes" folder casually sitting on ur desktop
bro Nuclear launch codes kills me LOL
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 install pyinstaller
+ ~~~
+ CategoryInfo : ObjectNotFound: (pip:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
use pip in the regular terminal not the python's
Have installed it but: "'pyinstaller' is not recognized as an internal or external command,
operable program or batch file." Why?
u must run it trought python terminal, not cmd
Thank you! very useful and interesting video!
Useful video, thanks.
WOOOO THANK YOU SO MUCH FOR THIS!!
Very good tut, Bro! How could I Put all files and images into the executable?
you can't
@@cooperdunn3808 you can
Bro you alrady put every images related to exe file and made it.. There are no need to put images into exe file.. You have already done it.
it dosent work. the cmd says it dont know what pyinstaller is
This is great but doesnt show how to keep image and music files attached to the game application.
Thanks Bro for this video!
1. cd to directory that contains your .py file
2. pyinstaller --onefile --uac-admin main.py this one works 100% better and doesnt give you a trojan
when making it
this is gonna be so helpful for pranking my family lol
Awesome Video! Thanks for the great help!
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.
same
same
same
Great. 👍👍
I did the same but I recieved this error "'pyinstaller' is not recognized as an internal or external command,
operable program or batch file." :(
First add pyinstaller in pycharm (click file /settings/click on your project/ then project interpreter
…. Click the “+” button to add pyinstaller (and pip also)..
Also, write down the python interpreter path here as well (example: C:\Users\eddie\AppData\Local\Programs\Python).. you can search this path in file explorer and then click view/unhide to get the Scripts folder portion of the path.. include this as part of the path when writing it down)
same
this guy is blessing us
I accidentally placed pyinstaller on the C/admin drive and now my C drive is cramped, what should I do to free up space? Can you help me? I sincerely thank you
When i transform it into a .exe, my computer can run it well, but in others computers, doesnt work because of the libraries i've imported in my code. How can i solve this?
Thanksssss
RuntimeError: Execution of 'set_exe_build_timestamp' failed - no more attempts left!
It helps alot thx!! :)
So i tried to do so but with dictionary not one file and my program won't run. There is no even error to let me know what's wrong T,T
'pyinstaller' is not recognized as an internal or external command,
operable program or batch file.
how can I fix that error?
First add pyinstaller in pycharm (click file /settings/click on your project/ then project interpreter
…. Click the “+” button to add pyinstaller (and pip also)..
Also, write down the python interpreter path here as well (example: C:\Users\eddie\AppData\Local\Programs\Python).. you can search this path in file explorer and then click view/unhide to get the Scripts folder portion of the path.. include this as part of the path when writing it down)
Next, paste this path into environment variables by right clicking the windows icon lower/left of screen and click ‘system’.. then scroll down to advanced system settings and click this… then click environment variables .. then highlight ‘path’ and edit.. here you add a new path in edit mode of ‘path’ (this is where you paste your c:\ Users\“ “ “python/script link)
Next, open cmd (search ‘cmd’ computer at lower/left of screen.
Here you will need to change the directory to Python by typing ‘cd C:\Users\eddie\AppData\Local\Program\Python\Python37\Scripts
You may have to type cd C:\Users
Then Cd Eddie
Then cd AppData (and so forth or until you get to the Scripts directory of Python37 (or another version)
Finally, change the name of your .py program/game to main.py and copy/paste this main.py file into your Script directory folder (the one from above shown) ..
.. go back to the cmd prompt where you changed the directory to Scripts
and type: pyinstaller-onefile main.py
This saves your program (changed to main.py) into main.exe .. it will be located in the ‘dist’ folder within either Scripts or the folder before that (Python37 etc)
Now, just copy/paste the exe file into a new folder with whatever else was in your project folder such as images and ideas.. when you run the exe file it will need these other items in the same folder
@@fasteddieguitar1891 what if I use vs code
Great video.
I trust a guy with nuclear launch codes
Thanks so much I will try this and this is why it wouldn't work I never set a directory
thanks but i had an issue in my code which worked perfectly fine in vs code but when i made an app it said this
Traceback (most recent call last):
File "imagery.py", line 2, in
File "PyInstaller\loader\pyimod02_importers.py", line 352, in exec_module
File "cvlib\__init__.py", line 8, in
File "PyInstaller\loader\pyimod02_importers.py", line 352, in exec_module
File "cvlib\gender_detection.py", line 3, in
ModuleNotFoundError: No module named 'tensorflow'
✌✌
Is it always so bulky?
My 6kb .py file was turned into a 25mb .exe file, which isn't as easy to send around.
whenever i run the exe file, a cmd window opens and closes immediatly, can anyone help?
it was my problem . it iritated me , i spent a lot of time but i found the solution .
you should use some input values as well as you need restarting program or program should be looping . you should use function code which is "def" . and also dont write -w before installation with cmd .
When you save your python file save it as .pyw then change it to exe.
The best
i just get 'pyinstaller' is not recognized as an internal or external command,
operable program or batch file.
what should i do?
i installed pyinstaller
this i even added the variable to the system path
Reinstall python and during the installation check the system path
First add pyinstaller in pycharm (click file /settings/click on your project/ then project interpreter
…. Click the “+” button to add pyinstaller (and pip also)..
Also, write down the python interpreter path here as well (example: C:\Users\eddie\AppData\Local\Programs\Python).. you can search this path in file explorer and then click view/unhide to get the Scripts folder portion of the path.. include this as part of the path when writing it down)
Will this work even if I have some other files to build the exe?
I have my .sql file and i place it in the folder where my .py is
Then from that folder i convert .py into .exe then when I drop my database i used my .py into mysql command line hoping that the .sql file i put in the folder will serve as my database. The executable file wont run. I have to import again my .sql file into mysql command line to be able to run my .exe
Please help me
👍👍
Please can you show me, How can I do it on Mac OS?
On macbook, I can’t like that.
Please, can you make video, How to do like that on mac OS
Thank you!!!!!!
made some of my programs into .exe but 2 weeks later all my . exe programs say an error message and code return -1.
So almost nobody cares that Bro has nuclear launch codes on his desktop? Hm...
"image.png": no such file or directory. sir how to convert with image too?
But why is it so slow to execute. Does that have anything to do with the libraries installed on my machine. Should I make an EXE file from a python file from a virtual environment? Or that is just how EXE works?
If you mean the app is slow maybe it's your python code and not optimised maybe try finding a profiler and finding the problem, and if you mean it takes long to convert py to exe then it just your pc hardware performance limitations
its how python works
Problem is, as said above, python works like this. It will make an insanely huge .exe file out of the script because of all the dependencies with the libs and stuff, making the computer need time to run/open it.
Even on this video, this simple clock app weighs like 8MB, which is already really big for a .exe file.
Not here to hate on the video though, that's cool to make an app with python ! It's just not the most optimized way
thank you so much.
THX BRO
I want to know the process, can't find info on it 😢
Windows defender raised virus alert on my program. Is it a 100% false positive? Or pyinstaller is not safe?
"Nuclear launch codes" 💀💀💀
hi ..
when I move the exe app to desktop the icon disappears
why this happened?
anywhere else the icon works fine
Thank you!
same
i have an error that the program after be exe it is run always never stops i have made it in multiprocessing @Bro Code
Have you tried pyscript?
My command prompt doesnt want to change directory :(
When I try to open the executable (yes my antivirus was off), it says "Fatal error detected" and "Failed to execute script calculator"(my program was a calculator)
Some or the other library file would have not got compiled try running your program with Idle first or complie your program with pyinstaller -F -i 'icon file' 'python file' in this way you will either get to know your error in IDLE or in cmd 😊
pyinstaller -F after i hit enter and it shows pyinstaller: error: the following arguments are required: scriptname ,why?
was that your whole line or was there more? Your supposed to type something like: pyinstaller - F (Filename).py
How to do with .jar programs from eclipse?
Just google "create EXE from JAR".
You will find your answer in less than a minute. I actually checked it :-)
for some reason when i try to turn it into executable, it says "'pyinstaller is not recognized as an internal or external command, operable program or batch file.". Can someone hep me please? i checked and it says i have py installer on pip list and it isnt outdated, please help me
enter these two line in order
pip uninstall pyinstaller
pip install pyinstaller
@@orish_arena reinstall python
I have a jpg images in my python script
How i can convert that into an exe file
Traceback (most recent call last):
File "WorldCraft.py", line 1, in
ModuleNotFoundError: No module named 'ursina'
What Causes This Error?
Which library have you imported?
Or it might just be a typo...
Ik its too late to ask but i asked just so i can avoid the mistake too if i encounter it in future
I made a program and tried to send it to a few people via discord and email but both got flagged for malware. I cant seem to find a work around on the internet. maybe im not looking hard enough. the program works fine on my pc. Anyone have a solution for this problem?
zip it
most messaging apps always flag .exe files no matter what
thanks
Nuclear launch codes 🤣🤣🤣🤣😎
So easyyyyyyyy!
it says py installer couldnt be found
it says it has a virus or potentialy unwanted software.. what to do maan
Windows Defender may prevent you from running the app
I can't install pyinstaller
i want that nuclear launch code
And how make multy file to exe
doesnt work for me
pyinstaller isnt recognized
pip install pyinstaller
Mac users just die 😭
yes