Это видео недоступно.
Сожалеем об этом.

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
    ===========================================================

Комментарии • 113

  • @BroCodez
    @BroCodez  3 года назад +29

    (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

    • @Digital-Light
      @Digital-Light 2 года назад +2

      0. pip install pyinstaller

    • @Mailo1x
      @Mailo1x 2 года назад

      After typing cmd in a search bar of windows explorer it opens prompt with that directory. Kinda useful i guess?

  • @astroo0o0
    @astroo0o0 Год назад +10

    TYSM, Bro, you really helped me, now I can send my projects to other people, even if they do not have a python :).

  • @omarsplaytimechannel
    @omarsplaytimechannel Год назад +6

    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

  • @trilochandas4527
    @trilochandas4527 10 месяцев назад

    Just nearly find your channel. By watching your video occasionally i starting to luffing )) like your vibe, Bro! 👊

  • @zuhriddinmarufjon2757
    @zuhriddinmarufjon2757 Год назад +3

    Today I finished writing my first app with this channel. Thank you very much

  • @eduardodelgado3973
    @eduardodelgado3973 2 года назад +3

    Mil gracias es súper simple y clara tu explicación.

  • @marioshusband3700
    @marioshusband3700 3 года назад +1

    bro, you are my savior in coding.

  • @Rxkx_99
    @Rxkx_99 2 месяца назад

    ahh yes a very casual "nuclear launch codes" folder casually sitting on ur desktop

  • @irakli989l5
    @irakli989l5 Год назад +1

    bro Nuclear launch codes kills me LOL

  • @daviper318
    @daviper318 11 месяцев назад +1

    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

    • @Algeriawindows69
      @Algeriawindows69 9 месяцев назад

      use pip in the regular terminal not the python's

  • @qoig
    @qoig 2 месяца назад +2

    Have installed it but: "'pyinstaller' is not recognized as an internal or external command,
    operable program or batch file." Why?

    • @mortix99
      @mortix99 Месяц назад

      u must run it trought python terminal, not cmd

  • @user-ww9hj3nz7e
    @user-ww9hj3nz7e 5 дней назад

    Thank you! very useful and interesting video!

  • @vignesh5618
    @vignesh5618 3 года назад +2

    Useful video, thanks.

  • @gobbogrob
    @gobbogrob Год назад +2

    WOOOO THANK YOU SO MUCH FOR THIS!!

  • @hilaryeins1
    @hilaryeins1 3 года назад +16

    Very good tut, Bro! How could I Put all files and images into the executable?

    • @cooperdunn3808
      @cooperdunn3808 Год назад

      you can't

    • @hgt3
      @hgt3 8 месяцев назад

      @@cooperdunn3808 you can

    • @emsheeranstudio3459
      @emsheeranstudio3459 7 месяцев назад

      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.

  • @TeGoatOfMinecraft
    @TeGoatOfMinecraft 7 месяцев назад +1

    it dosent work. the cmd says it dont know what pyinstaller is

  • @Panduhman360
    @Panduhman360 9 месяцев назад +1

    This is great but doesnt show how to keep image and music files attached to the game application.

  • @cristiucvladimir7909
    @cristiucvladimir7909 3 месяца назад

    Thanks Bro for this video!

  • @fnbubbles420
    @fnbubbles420 7 месяцев назад

    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

  • @arpanshah355
    @arpanshah355 Год назад

    this is gonna be so helpful for pranking my family lol

  • @learningtho582
    @learningtho582 2 года назад +1

    Awesome Video! Thanks for the great help!

  • @praveendesu
    @praveendesu Год назад +3

    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.

  • @abstractideas7799
    @abstractideas7799 Год назад

    Great. 👍👍

  • @zahramanafi4793
    @zahramanafi4793 Год назад +2

    I did the same but I recieved this error "'pyinstaller' is not recognized as an internal or external command,
    operable program or batch file." :(

    • @ganeshkumarvenkatesan30
      @ganeshkumarvenkatesan30 Год назад

      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)

    • @baseless7581
      @baseless7581 7 месяцев назад

      same

  • @manuelvaal1257
    @manuelvaal1257 2 года назад +1

    this guy is blessing us

  • @user-uo2qm1vq8y
    @user-uo2qm1vq8y 3 месяца назад

    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

  • @Laioneel
    @Laioneel 2 месяца назад

    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?

  • @globalpepe4094
    @globalpepe4094 5 месяцев назад +1

    Thanksssss

  • @sceti
    @sceti 6 месяцев назад

    RuntimeError: Execution of 'set_exe_build_timestamp' failed - no more attempts left!

  • @Tr0ll_Guy
    @Tr0ll_Guy Год назад

    It helps alot thx!! :)

  • @kacperwawrzyniak5353
    @kacperwawrzyniak5353 5 дней назад

    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

  • @VoNgocTrungNguyen
    @VoNgocTrungNguyen 2 года назад +3

    'pyinstaller' is not recognized as an internal or external command,
    operable program or batch file.
    how can I fix that error?

    • @fasteddieguitar1891
      @fasteddieguitar1891 Год назад

      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

    • @shorts9900
      @shorts9900 Год назад

      @@fasteddieguitar1891 what if I use vs code

  • @kvelez
    @kvelez Год назад

    Great video.

  • @user-mt8ot9fc5g
    @user-mt8ot9fc5g 5 месяцев назад

    I trust a guy with nuclear launch codes

  • @creemcheese9416
    @creemcheese9416 Год назад

    Thanks so much I will try this and this is why it wouldn't work I never set a directory

  • @Quantum_phy
    @Quantum_phy 3 месяца назад +1

    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'

  • @behindthescene2727
    @behindthescene2727 2 года назад

    ✌✌

  • @Fuzmonster59
    @Fuzmonster59 3 месяца назад

    Is it always so bulky?
    My 6kb .py file was turned into a 25mb .exe file, which isn't as easy to send around.

  • @marcbejjani1370
    @marcbejjani1370 3 года назад +2

    whenever i run the exe file, a cmd window opens and closes immediatly, can anyone help?

    • @saitamatechno
      @saitamatechno 2 года назад +1

      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 .

    • @kaolin-x4790
      @kaolin-x4790 2 года назад +1

      When you save your python file save it as .pyw then change it to exe.

  • @kingButthornGriff
    @kingButthornGriff 9 месяцев назад

    The best

  • @PilotTurtle
    @PilotTurtle 2 года назад +1

    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

    • @justwei5668
      @justwei5668 2 года назад

      this i even added the variable to the system path

    • @reptileita
      @reptileita 2 года назад

      Reinstall python and during the installation check the system path

    • @ganeshkumarvenkatesan30
      @ganeshkumarvenkatesan30 Год назад

      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)

  • @Siissioe123
    @Siissioe123 Год назад

    Will this work even if I have some other files to build the exe?

  • @rizaldycesarquimno6164
    @rizaldycesarquimno6164 3 года назад

    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

  • @hannibalbianchi1466
    @hannibalbianchi1466 3 года назад

    👍👍

  • @popninetyone
    @popninetyone 8 месяцев назад

    Please can you show me, How can I do it on Mac OS?

  • @popenv9471
    @popenv9471 7 месяцев назад

    On macbook, I can’t like that.
    Please, can you make video, How to do like that on mac OS

  • @slonbeskonechen8310
    @slonbeskonechen8310 3 года назад

    Thank you!!!!!!

  • @cyberroland8061
    @cyberroland8061 Год назад

    made some of my programs into .exe but 2 weeks later all my . exe programs say an error message and code return -1.

  • @joehaar1466
    @joehaar1466 8 месяцев назад

    So almost nobody cares that Bro has nuclear launch codes on his desktop? Hm...

  • @nasrannaain8783
    @nasrannaain8783 Год назад

    "image.png": no such file or directory. sir how to convert with image too?

  • @teradefense5905
    @teradefense5905 2 года назад +1

    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?

    • @alexdefoc6919
      @alexdefoc6919 11 месяцев назад

      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

    • @Algeriawindows69
      @Algeriawindows69 9 месяцев назад

      its how python works

    • @super.kebab70
      @super.kebab70 8 месяцев назад

      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

  • @Tristan-Ware
    @Tristan-Ware 11 месяцев назад

    thank you so much.

  • @MrEdoben
    @MrEdoben Год назад

    THX BRO

  • @mystic9609
    @mystic9609 Год назад

    I want to know the process, can't find info on it 😢

  • @99skorpion
    @99skorpion 3 года назад

    Windows defender raised virus alert on my program. Is it a 100% false positive? Or pyinstaller is not safe?

  • @xlCool
    @xlCool Год назад

    "Nuclear launch codes" 💀💀💀

  • @kareemalmkahelah5338
    @kareemalmkahelah5338 2 года назад +1

    hi ..
    when I move the exe app to desktop the icon disappears
    why this happened?
    anywhere else the icon works fine
    Thank you!

  • @abdelrahmansameh5183
    @abdelrahmansameh5183 Год назад

    i have an error that the program after be exe it is run always never stops i have made it in multiprocessing @Bro Code

  • @sammyay-man2754
    @sammyay-man2754 7 месяцев назад

    Have you tried pyscript?

  • @Boofydev
    @Boofydev 3 года назад

    My command prompt doesnt want to change directory :(

  • @marioshusband3700
    @marioshusband3700 3 года назад

    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)

    • @utkarshsingh1584
      @utkarshsingh1584 3 года назад +1

      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 😊

  • @masculinshorts
    @masculinshorts Год назад

    pyinstaller -F after i hit enter and it shows pyinstaller: error: the following arguments are required: scriptname ,why?

    • @cyberroland8061
      @cyberroland8061 Год назад

      was that your whole line or was there more? Your supposed to type something like: pyinstaller - F (Filename).py

  • @creepercheater0148
    @creepercheater0148 3 года назад +1

    How to do with .jar programs from eclipse?

    • @igorthelight
      @igorthelight 3 года назад

      Just google "create EXE from JAR".
      You will find your answer in less than a minute. I actually checked it :-)

  • @ishaan-gupta
    @ishaan-gupta 2 года назад

    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

    • @yourhardworkgone
      @yourhardworkgone 2 года назад +1

      enter these two line in order
      pip uninstall pyinstaller
      pip install pyinstaller

    • @yourhardworkgone
      @yourhardworkgone 2 года назад

      @@orish_arena reinstall python

  • @autarroy
    @autarroy 2 года назад

    I have a jpg images in my python script
    How i can convert that into an exe file

  • @enesozdemir9304
    @enesozdemir9304 2 года назад

    Traceback (most recent call last):
    File "WorldCraft.py", line 1, in
    ModuleNotFoundError: No module named 'ursina'
    What Causes This Error?

    • @arafatmohammadasifbamboowa2211
      @arafatmohammadasifbamboowa2211 Год назад

      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

  • @Dripdaddy92
    @Dripdaddy92 Год назад

    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?

  • @jimmylee3760
    @jimmylee3760 Год назад

    thanks

  • @DavidR...
    @DavidR... Год назад

    Nuclear launch codes 🤣🤣🤣🤣😎

  • @MFNJairah
    @MFNJairah 2 года назад

    So easyyyyyyyy!

  • @Venta-wd6hh
    @Venta-wd6hh 10 месяцев назад

    it says py installer couldnt be found

  • @kraizabg1242
    @kraizabg1242 3 года назад

    it says it has a virus or potentialy unwanted software.. what to do maan

    • @yourhardworkgone
      @yourhardworkgone 2 года назад

      Windows Defender may prevent you from running the app

  • @Lurkingbird
    @Lurkingbird Год назад

    I can't install pyinstaller

  • @saveuyghurmuslims2354
    @saveuyghurmuslims2354 Год назад

    i want that nuclear launch code

  • @DavidDavid-zm1kj
    @DavidDavid-zm1kj Год назад

    And how make multy file to exe

  • @anafel8124
    @anafel8124 Год назад

    doesnt work for me

  • @TouchcreatorYT
    @TouchcreatorYT 2 года назад

    pyinstaller isnt recognized

    • @jacery
      @jacery 2 года назад +2

      pip install pyinstaller

  • @NOTHING-en2ue
    @NOTHING-en2ue Год назад

    Mac users just die 😭