Problems with Pyinstaller & and Common Fixes

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 พ.ย. 2024

ความคิดเห็น • 89

  • @mister-bellini
    @mister-bellini ปีที่แล้ว +11

    I hate pyinstaller so much. Unfortunately I depend on it, but the number of times it was not working for no obvious reason when it was working just fine the other day is outrageous.

    • @mister-bellini
      @mister-bellini ปีที่แล้ว +2

      @@HassanAchieved I wish I could. I never had this error yet. :-(
      I needed over 1 week myself to get it to work again (when it was working fine for like 3 years now, but then one day it decided to not find imports anymore). So fucking annoying. Still gotta be thankful for the developers that built this tool, eventhough I hate it with my guts. Good luck

  • @Alvaro-cm2nq
    @Alvaro-cm2nq 22 วันที่ผ่านมา

    Thankyou bro I takes me two hours until found you ...

  • @yuliamala6210
    @yuliamala6210 2 ปีที่แล้ว +2

    Great info, I just want to add- with Pyinstaller (so with Auto py to exe as well) you can only convert py to Mac app if you do it on Mac and exe for Windows if you built in on Windows platform. It’s not clearly written on py installer website, but it appears in the documentation. So if I need to make exe on my Mac - PyInstaller is not the case. In any case thank you a lot for your videos!

  • @muhammadraflipratama4483
    @muhammadraflipratama4483 ปีที่แล้ว

    Thankyou brother, you save me from my lecturer

  • @kurtsmock2246
    @kurtsmock2246 ปีที่แล้ว

    God Bless You SIR! I'm a lucky ducky to have found this video. (search term was 'pyinstaller multiple file included' for those interest). It was a top result. Good god you saved me some time. Let me buy you a drink 💪🍻

  • @marciomartignoni2460
    @marciomartignoni2460 2 ปีที่แล้ว +1

    It solved a problem of not recognizing pandas-ta lib. Thanks!!!

    • @rezamomeni7155
      @rezamomeni7155 ปีที่แล้ว +2

      How?
      I have problem when I import pandas library

  • @Azula193
    @Azula193 2 ปีที่แล้ว

    Ty very much! Informative and simplistic. I was fighting tooth and nails to get my images in a exe and was losing badly.

  • @aaqilstech
    @aaqilstech ปีที่แล้ว

    Thank you so much! You helped me finally finish my ICT project!

  • @nialyavuzturk379
    @nialyavuzturk379 5 หลายเดือนก่อน

    Thank you so much! this video helped me figure out the problem, thanks!

  • @hpsd9857
    @hpsd9857 5 หลายเดือนก่อน

    tks for great video, this resolved my problem. Thanks so much

  • @MatBat__
    @MatBat__ 2 ปีที่แล้ว +3

    Very cool library this auto-py-to-exe. Thx for the tips, cheers!

  • @AliNadim-fm9te
    @AliNadim-fm9te 7 หลายเดือนก่อน

    Helped a lot. Very informative.

  • @BrettPalmer-p6r
    @BrettPalmer-p6r ปีที่แล้ว

    nice been looking for something like this. ty

  • @yagoubia.e.k4148
    @yagoubia.e.k4148 6 หลายเดือนก่อน

    This is very helpful thank you

  • @jphanikumar8638
    @jphanikumar8638 ปีที่แล้ว +1

    Tried all but still getting the same FileNotFound error. Just copy pasted the images folder with all my images into the "dist" folder which I get after py-installing. Worked like a charm for me 😂

  • @primescope6874
    @primescope6874 ปีที่แล้ว

    Another great video - thanks for producing this.

  • @raghavsrivastava10
    @raghavsrivastava10 5 หลายเดือนก่อน

    Thanks you, you are a saviour.

  • @kotcraftchannelukraine6118
    @kotcraftchannelukraine6118 ปีที่แล้ว

    It is not just for Windows, i learning AI and creating GLaDOS in Python and i know that pyinstaller with staticx can make statically linked ELF files that work on almost every modern Ubuntu/Debian

  • @nicolasmicaux8431
    @nicolasmicaux8431 ปีที่แล้ว

    excellent video! thanks so much

  • @bilalelkissai2932
    @bilalelkissai2932 2 ปีที่แล้ว

    Amazing, wonderful, clear, clean, smooth explanation!!

  • @captainhack8051
    @captainhack8051 ปีที่แล้ว

    The best solution vid ty

  • @kzlvskh
    @kzlvskh ปีที่แล้ว +2

    Legend. Thank you for this video. Great explanation. I am new to coding, and this helped me with my first simple job after searching for the required info, as I had difficulties with compiling everything into a single .exe file and understanding how to apply the resource_path in both tkinter and pygame. By the way, how do you add single brackets on 15:27?

  • @ansar5441
    @ansar5441 8 หลายเดือนก่อน

    Thanks for the tutorial. I faced an issue after converting the tkinter file to exe using pyinstaller. When running it, I got an error "no module named tkinter". I don't know how to solve it. I have already installed tkinter, and when converting the file, I used the hidden import attribute as well, but it's not working. Please help me.

  • @raymondmonroe3589
    @raymondmonroe3589 2 ปีที่แล้ว +4

    Great video. I am having one problem. Pyinstaller does not seem to be grabbing the imported libraries, for example I keep getting 'ModuleNotFoundError: No module name request'.

    • @LeeBrenton
      @LeeBrenton 2 ปีที่แล้ว

      me too

    • @jphanikumar8638
      @jphanikumar8638 ปีที่แล้ว

      I faced the same issue with xlsx writer (I use Anaconda). I had two different environments (one was "base", the other was "user_defined"). Turned out I was coding in the base env and using pyinstaller in "user_defined" env. Installed the xlsx writer module also in the user_defined env and then it worked for me. Hope this helps!

  • @AviationLolz
    @AviationLolz 10 หลายเดือนก่อน

    Anyone know why it my CMD keeps saying its not recognised. Same with tip 1

  • @DeusAutemEstInanis
    @DeusAutemEstInanis ปีที่แล้ว

    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.)

  • @aponiaintheflesh
    @aponiaintheflesh 2 ปีที่แล้ว

    You're the best! Ty.

  • @buzzdx
    @buzzdx 5 หลายเดือนก่อน +1

    tried to run pyinstaller, immediately got the file killed by defender. is there no way to get around this problem for good? it seems to be around for a long time already.

    • @coderslegacy5661
      @coderslegacy5661  4 หลายเดือนก่อน

      Unfortunately not. Best way to avoid it is to use something else like Nuitka. Here's a video if you are interested.
      th-cam.com/video/z2aHkuBCLN8/w-d-xo.htmlsi=pOYBsv_R5jV5GRzv

  • @michelleblackrose
    @michelleblackrose ปีที่แล้ว

    I am having a problum when i add a folder the images and sound files dont show up

  • @SreshthaBhatt
    @SreshthaBhatt 6 หลายเดือนก่อน

    But I don't think only using onefile flag will identify the image file . You have to use add-data flag to add it when building it.

    • @coderslegacy5661
      @coderslegacy5661  6 หลายเดือนก่อน

      That's correct. If you are adding data files such as images you need to use --add-data.

  • @raccoon_05
    @raccoon_05 ปีที่แล้ว +1

    I've had an issue where pyinstaller/auto py to exe did package my python project (which is a simple video downloader which uses youtube-dl module) with no issues and when I ran it it still ran with no issues but then when I actually tried to download a video it would always give me an error. I tried many solutions i found online but none worked. Finally I fixed it by selecting console based instead of window based (no console) in auto py to exe. So if anyone's having a similar issue you can try that.
    Edit: I'll update this if a find a way to fix the issue without getting the console.

    • @coderslegacy5661
      @coderslegacy5661  ปีที่แล้ว +1

      Could you mention the error here? Maybe I know a fix, or it might help someone else.

    • @raccoon_05
      @raccoon_05 ปีที่แล้ว

      @@coderslegacy5661 Pyinstaller did build the project and the exe opened fine but when I tried to download a video it didn't download it and gave me an error

    • @codegeassprogramming
      @codegeassprogramming ปีที่แล้ว

      @@coderslegacy5661 same it occurs if you do console it works but if you do nocmd (--windowed) it doesn't work app opens but if you click a button that is running another python file by importing it doesn't work

  • @ftheworld2885
    @ftheworld2885 9 หลายเดือนก่อน

    sir please use pyzbar and the try to create exe file , in window 11.... these is error

  • @kohinoorbharti3691
    @kohinoorbharti3691 2 ปีที่แล้ว

    How to add templates and static folder in it??? im getting Invalid file descriptor to ICU data received. this error

  • @Inmate533
    @Inmate533 2 ปีที่แล้ว +1

    I get an error auto-py-to-exe not found after successfully installing.

    • @tectoboom2627
      @tectoboom2627 2 ปีที่แล้ว +1

      same dude.

    • @coderslegacy5661
      @coderslegacy5661  2 ปีที่แล้ว

      Try running it using this command "python -m auto_py_to_exe" in your terminal.

  • @jonakthakuria8508
    @jonakthakuria8508 ปีที่แล้ว

    Sir, dose the tips that you gave works for virtual environment the same way?

    • @coderslegacy5661
      @coderslegacy5661  ปีที่แล้ว +1

      There should not be any difference, generally speaking.

    • @JonakT
      @JonakT ปีที่แล้ว

      @@coderslegacy5661 Okay, sir thanks you.

  • @alexeyluzin4485
    @alexeyluzin4485 10 หลายเดือนก่อน

    There's a big issue, when Windows Defender recognizes an exe-file, compiled by Pyinstaller, as a malicious trojan. And you need to explain this situation to your customers. What is the best solution for this?

    • @coderslegacy5661
      @coderslegacy5661  10 หลายเดือนก่อน +1

      I agree, this is quite an issue with pyinstaller. I wrote an article on this topic, explaining various solutions to this problem. Here is the link.
      coderslegacy.com/pyinstaller-exe-detected-as-virus-solutions/

    • @alexeyluzin4485
      @alexeyluzin4485 10 หลายเดือนก่อน

      ​@@coderslegacy5661 The most comprehensive article on this topic, thank you!

  • @dangnguyenvan5500
    @dangnguyenvan5500 ปีที่แล้ว

    Hi sir!
    Thanks your video, I have a question that it seems to take a long time for the .exe file to start,
    is there any way to make the exe file small in size and start up fast?

    • @coderslegacy5661
      @coderslegacy5661  ปีที่แล้ว

      Yes, you can reduce the number of dependencies involved. You can use virtual environments to make sure only the libraries you need are installed. Alternatively, you can use a different python library for creating EXE's, such as cx_Freee or Nuitka, which both have faster load times.

    • @dangnguyenvan5500
      @dangnguyenvan5500 ปีที่แล้ว

      @@coderslegacy5661 Thank you very much!

  • @bestdialogues903
    @bestdialogues903 6 หลายเดือนก่อน

    Hidden import issue please make one vedio on it

    • @coderslegacy5661
      @coderslegacy5661  6 หลายเดือนก่อน

      I got you. I made a video on this (using the GUI interface auto-py-to-exe).
      th-cam.com/video/A_EpMKmMMKI/w-d-xo.html

  • @sud0b01
    @sud0b01 2 ปีที่แล้ว

    My program only runs on the console, where I need to put the information. However, even with an entry right at the beginning, the console opens and closes... Starts the exe, but only opens and closes the console. Do you know why?

    • @coderslegacy5661
      @coderslegacy5661  2 ปีที่แล้ว +1

      Not sure. Most likely an issue in the code. Try to figure out whether pyinstaller itself is working. Try some different programs? add a time.sleep(5) statement to pause the window. Maybe make some prints to the console, etc.
      If same issue persists it's likely an issue with pyinstaller.

    • @sud0b01
      @sud0b01 2 ปีที่แล้ว

      @@coderslegacy5661 I managed to fix it, I put a "time.sleep()" and it worked fine. Thank you very much friend! #Brazil

  • @khanalimphdpe172
    @khanalimphdpe172 2 ปีที่แล้ว

    I can create exe file from python script. Everything works in my computer. Problem is that when I move file from my computer to other computer (regardless of windows of Mac) does not work. That new computer even do not recognize the exe file as exe file. Can anyone have any understandin?

    • @__Merchant
      @__Merchant 4 หลายเดือนก่อน

      Mac does not understand .exe files, only Windows does. and that also depends on what type of windows operating system. if you are trying to execute a modern exe file on Windows XP, then obviously that will not work

  • @dileeshaabilash5562
    @dileeshaabilash5562 2 ปีที่แล้ว

    Save My Day

  • @bdlramansad
    @bdlramansad 2 ปีที่แล้ว

    I have made a python executable but it fails if not run with administrator. I have other files on my pc that has a UAC icon and when clicked always run as administrator

    • @coderslegacy5661
      @coderslegacy5661  2 ปีที่แล้ว

      Sounds like a bit of unique case. How about you try going into properties (right click on the exe) and then tick the "run as administrator" checkbox.

    • @bdlramansad
      @bdlramansad 2 ปีที่แล้ว

      @@coderslegacy5661 I want run as adimistrator run automaticelly how can I do that

    • @ardra5878
      @ardra5878 8 หลายเดือนก่อน

      @@bdlramansad hey do you run the exe with administrator privilege automatically?

    • @bdlramansad
      @bdlramansad 8 หลายเดือนก่อน

      @@ardra5878 This was a year ago. I was a beginner. Now I'm a little better. Yes, I solved the problem just add --uac-admin with pyinstaller compiling command as example like that pyinstaller -F main.py --uac-admin

  • @HDGamers
    @HDGamers ปีที่แล้ว +1

    same shit ===pyinstaller : The term 'pyinstaller' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the n
    ame, or if a path was included, verify that the path is correct and try again.

    • @coderslegacy5661
      @coderslegacy5661  ปีที่แล้ว +1

      If you are getting that error, Python is most likely not added to PATH. Have you checked to see if it?

  • @bigrevkev55
    @bigrevkev55 2 ปีที่แล้ว

    auto-py-to-exe: command not found

    • @coderslegacy5661
      @coderslegacy5661  2 ปีที่แล้ว

      Sounds like a Python PATH issue. You can easily verify this by running "python -V" in the command prompt. If it doesn't work, your Python is not added to PATH. You can look it up online how to do this.
      If that's not the issue, Try running it using this command "python -m auto_py_to_exe" in your terminal.

    • @bigrevkev55
      @bigrevkev55 2 ปีที่แล้ว

      @@coderslegacy5661 thanks for replying. I’ll give that a shot

  • @managerfufu
    @managerfufu 2 ปีที่แล้ว +1

    i encounter a problem: it says pyinstaller is not an executable , sth like that , plz tell me how to fix

    • @coderslegacy5661
      @coderslegacy5661  2 ปีที่แล้ว +1

      That's a pretty vague problem you just described. Where exactly is the problem occurring?
      You should first check to see if pyinstaller was successfully installed. You can try checking the current version using pip. Another possible problem is that you do not have Python added to PATH (environment variables). If that is the case, you should do a google search for "Add Python to PATH" and follow the first video.

    • @managerfufu
      @managerfufu 2 ปีที่แล้ว +2

      @@coderslegacy5661 problem was python wasn't added to path , solved the problem thnx

  • @workingyabs5683
    @workingyabs5683 5 หลายเดือนก่อน

    nice i can hear the chinese within you lol

  • @ReinventedWeb
    @ReinventedWeb 2 ปีที่แล้ว

    Catto

  • @CoolHappi
    @CoolHappi ปีที่แล้ว

    Nice Video but to Many ok's

  • @goblinslayer6375
    @goblinslayer6375 2 หลายเดือนก่อน

    not to be rude but, are u a stutter?

  • @valdoschaos281
    @valdoschaos281 7 หลายเดือนก่อน

    who cares!!! pyinstaller takes like 48 hours if you got 500 lines of code and five Libraries!!!!!!!

    • @coderslegacy5661
      @coderslegacy5661  7 หลายเดือนก่อน

      Never had that kind of experience. I've compiled applications for a client before (10000 lines of code, dozens of code files) Project within 40 mins. There could be some other issue limiting you, like hardware or possibly a bug.
      Even the biggest libraries like the AI ones shouldn't take that long. 48 hours is unreasonable.

  • @MrAsante-jj4us
    @MrAsante-jj4us 10 หลายเดือนก่อน

    Long talking.

  • @CaseyBlase
    @CaseyBlase ปีที่แล้ว

    OMG LESS WORDS!
    You keep repeating yourself.

    • @CaseyBlase
      @CaseyBlase ปีที่แล้ว

      I punched myself in the face to keep myself focused from skipping forward because I lose you but I need the information, but you are so hard to listen to. LESS WORDS. Get to the point!