Convert PY to EXE Automatically

Share
Embed
  • Published on Mar 14, 2018
  • This video demonstrates how to convert .py to .exe with the project auto-py-to-exe so you can run a python script without python on the host computer. The interface is very simple and offers a lot of options.
    Python 3.7 is now supported! 🎉
    🐍 A faster way install this is to execute "pip install auto-py-to-exe"
    This project uses Pyinstaller to convert the script and Eel for the interface. It also uses chrome to display a local server. (Chrome is not required, Firefox/Edge/an other browser will work just as well).
    🌎 Github Repository (Project): github.com/brentvollebregt/auto-py-to-exe
    🌎 The article for this project: nitratine.net/blog/post/auto-py-to-exe/
    🌎 Having some issues? Read this first to clear some things up: nitratine.net/blog/post/issues-when-using-auto-py-to-exe/
    📺How to Setup Pythons PIP: ru-clip.net/video/cm6WDGAzDPM/video.html
    📺 Convert PY to EXE (manual): ru-clip.net/video/lOIJIk_maO4/video.html
    Python 2.7 and above to 3.7 is supported.
    🐍 In this video I use Python 3.5.
    👍🏼 Feel free to comment with any issues.

Comments • 1 825

  • Ömer Tarık Öztürk
    Ömer Tarık Öztürk 16 hours ago

    First of all it's amazing program for people that use python. But i have an issue. Although my code of all is correct, this program shows me it has mistake. I'm waiting your help, thanks.

    • Ömer Tarık Öztürk
      Ömer Tarık Öztürk 14 hours ago

      The error is caused by not importing tkinter module. But tkinter is imported by me and it is running on idle.

    • Ömer Tarık Öztürk
      Ömer Tarık Öztürk 15 hours ago

      @PyTutorials When i launched my code on Python IDLE, it's running correctly. But it is not possible to say the same when i run .exe file. I can changing format from .py to .exe but when i double left click to .exe folder, "Tcl Error: couldn't open "myimage.png": no such file or directory.
      [6532] Failed to execute script 'myfilename'" mistake is shown me.

    • PyTutorials
      PyTutorials  15 hours ago

      What do you mean by this program shows you your code has a mistake? Could you explain further?

  • cyc00chy
    cyc00chy 2 days ago

    Thank You for this video and for pycryptodome tutorial!

  • Ipad Tsui
    Ipad Tsui 2 days ago

    Your programme sucks .It didn't even work. You are just making something useless.

    • PyTutorials
      PyTutorials  2 days ago

      Thanks man, you enjoy putting others down?

  • Navnita Prakash
    Navnita Prakash 4 days ago

    HI
    my game was executed but i cant start playing my game after that! any suggestions? i need to know this asap thanks

    • PyTutorials
      PyTutorials  2 days ago

      Do any errors appear in the console when using the method I describe in the post?

    • Navnita Prakash
      Navnita Prakash 3 days ago

      @PyTutorials when I click the start button of my game , it says windows have stopped working

    • PyTutorials
      PyTutorials  3 days ago

      What is "windows have error"? Could you please be more specific?

    • Navnita Prakash
      Navnita Prakash 3 days ago

      @PyTutorials yes i have yet i face problems
      its only when i click the start button then it shows windows have error

    • PyTutorials
      PyTutorials  3 days ago +1

      Did you read the post linked at the end of every build? Reading the debugging section could help you identify errors being thrown in the background.

  • Ofer Hagai
    Ofer Hagai 5 days ago

    Ran everything like you said in the video and everything worked fine, but when I'm trying to open the .exe file I get the following error: "Failed to execute scrip "file name"...could you advise?

    • PyTutorials
      PyTutorials  4 days ago

      Did you read the post that is linked at the bottom of the ui after every build? I discuss how to debug the script to discover what the error really is: nitratine.net/blog/post/issues-when-using-auto-py-to-exe/

  • Pingu-Io
    Pingu-Io 8 days ago

    Hey man, can i make a exe file that for be open you don't need the libraries of the py project?

    • PyTutorials
      PyTutorials  8 days ago

      If you package everything into an executable then all the libraries will be packaged with it.

  • Exoson
    Exoson 10 days ago +1

    Once I figured out where pip was located it went smoothly. Works great, thanks.

  • Sethu Eapen
    Sethu Eapen 11 days ago +1

    Great tutorial! The program worked perfectly. When I run the program, the top of the window uses the Windows dark theme that I enabled inside Windows system settings. I know that you are using eel for this but do you know if there is a similar thing in Tkinter, where it uses the default Windows window? Thanks!

    • PyTutorials
      PyTutorials  11 days ago

      This application uses Chrome so it uses the theme automatically.

  • jay solano
    jay solano 11 days ago

    hi can this compile multiple classes into main.py?

    • PyTutorials
      PyTutorials  11 days ago

      Use the entry point when declaring the script location. PyInstaller searches for imports to get the rest of the Python files required to run, so as long as you use the import keyword, your files will be added.

  • IllI lIIl
    IllI lIIl 13 days ago

    ok

  • MR Jax
    MR Jax 16 days ago

    and how to deconvert it to python again

    • PyTutorials
      PyTutorials  16 days ago

      Here is a similar stack exchange question: reverseengineering.stackexchange.com/q/160

  • nandu
    nandu 16 days ago

    can we convert plotly dash(python flask) into .exe ?? when i double click on that .exe file it should automatically open browser and execute it.. is it possible??

    • PyTutorials
      PyTutorials  16 days ago

      Regarding you have setup the build properly, it should work. Have you tried? That will be the only way to find out.

  • Tzutzumo
    Tzutzumo 17 days ago

    Great tutorials! It works, but not with Firefox. I have to use Edge or IE 11. Firefox opens with localhost:56622/main.html in the adress bar and tells me "site not found". Is there a way to set Edge as default browser for the script without changing the system default browser? Thanks.

    • Tzutzumo
      Tzutzumo 17 days ago +1

      @PyTutorials That's what i did, when i noticed that Edge works. Ok. then i will use it this way. Thanks for the quick answer.

    • PyTutorials
      PyTutorials  17 days ago +1

      This uses the system default browser if Chrome cannot be found. You can copy the URL and visit it in another browser if you want (go to the page in the other browser before closing the one that launched)

  • Ryan Schroeder
    Ryan Schroeder 20 days ago

    This is creating a .spec file. Am I doing something wrong?

    • PyTutorials
      PyTutorials  20 days ago

      Inside the output folder I show in the video? Good to here you found it!

    • Ryan Schroeder
      Ryan Schroeder 20 days ago +1

      PyTutorials I found the ex’s file. It was inside of another folder. Thanks for the tutorial!

    • PyTutorials
      PyTutorials  20 days ago

      Where is it creating it?

  • Hemant S
    Hemant S 21 day ago

    I think you are too fast and with a lot of rapid activity on the screen. I love what you show but you loose the charm with so much speed In screen activity and speed of talking. Please consider going a bit slow. Thanks.

    • PyTutorials
      PyTutorials  20 days ago +1

      Yea yea, I get ya. I'm starting to agree with this also, a bit slower could help

    • Hemant S
      Hemant S 20 days ago

      PyTutorials . Oh, please don’t get me wrong. I loved the to the point approach, brevity and coming to the topic right away. The content and quality is awesome. I am going to come back to your channel often. I was trying to read things on the screen. And I was not able to. Just a bit slower would make it PERFECT.

    • PyTutorials
      PyTutorials  20 days ago

      Interesting, I get majority of people happy with the speed and the no wasted time but I still understand some people still don't like this. Thanks for sharing your opinion, it's always interesting to get a feel of how people feel about the pace. Just a side recommendation: did you know RU-clip has built in playback speed control?

  • zGennyTv
    zGennyTv 23 days ago

    Hi, i followed your video but your progam, but it opens on my browser and idk why. What can i do?

    • zGennyTv
      zGennyTv 23 days ago +1

      oh, ok. Thanks. Nice work by the way!!

    • PyTutorials
      PyTutorials  23 days ago +1

      If it can't find Chrome, it will use your *defualt* browser (which could be Chrome). This will work in most browsers (Chrome, Edge, Firefox...) so you can still use it as it is.

  • Sergio Junior
    Sergio Junior 23 days ago

    I need help importing the serial module, it gives me an error: AttributeError: module 'serial' has no attribute 'Serial'. I have tried a lot of stuff but nothing is working, is there a way to import the serial module independently from the other modules?

    • PyTutorials
      PyTutorials  23 days ago

      I failed to mention? That is how Python works. I don't do any path magic here, it is all based off how your environment is setup.

    • Sergio Junior
      Sergio Junior 23 days ago

      @PyTutorials I don't know what you did sir, but thank you for responding so quickly on a more than year-old video, I think you failed to mention that your converter uses the system modules from the Python path, and not the ones that are in the folder (example pycharm and its venv) but thanks a lot anyway. Your program is such a god sent

    • Sergio Junior
      Sergio Junior 23 days ago

      @PyTutorials No, its called main.py. Im trying everythin I can found on the internet. Right now im trying to import pyserial by hidden module but no luck, would you like to look at my code?

    • PyTutorials
      PyTutorials  23 days ago

      Have you got a file your're using called serial.py?

  • ניר גולומבק
    ניר גולומבק 23 days ago

    when i double click thr run program its show me a window and then disapear. what should i do ?

    • PyTutorials
      PyTutorials  23 days ago

      Did you read the article that appears linked at the bottom of the UI after every build? I highly recommend this first. You need to run the executable using cmd and look at the output (as described in the article). What is the output?

  • Pyr0
    Pyr0 23 days ago

    when i do the whole thing with python run .py it says that the file is not available and yes it's not available :/

    • Pyr0
      Pyr0 21 day ago

      PyTutorials it has worked thanks! :D

    • PyTutorials
      PyTutorials  21 day ago

      When executing `dir`, you should not get an error... It lists the directory.

    • Pyr0
      Pyr0 22 days ago

      PyTutorials nope it says that there is no such directory as “run”

    • PyTutorials
      PyTutorials  23 days ago +1

      If you execute `dir` just before you execute the command, is `run.py` there?

  • Anonymous Anonymous
    Anonymous Anonymous 24 days ago

    I tried this on my old laptop that was barely able to upgrade to Windows 10 in under a day and It took around an hour to convert a small python program I made.

  • Virat Kohli
    Virat Kohli 25 days ago +2

    Sir you are really ultra legend

  • iNji 555
    iNji 555 Month ago

    When i build one file with eel, and run programm.exe - error "Failed to execute script programm"

    • PyTutorials
      PyTutorials  Month ago

      Did you read the post that is linked at the bottom of every build? If so, what actually is your error?

  • nani
    nani Month ago

    source code string cannot contain null bytes
    ?

    • PyTutorials
      PyTutorials  Month ago

      Could you expand on this please? Where did this occur? What were you executing? Is there a full traceback I can look at?

  • Adrián
    Adrián Month ago +1

    It converts it, but when I start the .exe file , nothing happens

    • Adrián
      Adrián 28 days ago

      @PyTutorials I'm on vacation for week. I will provide it later. But only third-party module I was using was pygame. If it is what you are asking.

    • PyTutorials
      PyTutorials  Month ago

      What third party modules are you using? Also could you provide more of the error (stacktrace is ideal)

    • Adrián
      Adrián Month ago

      ​@PyTutorials I reinstall it and it's working now. But when I'm trying to debug I don't now what to do. Error says : ModuleNotFoundError: No module named 'win32com' , but when I added win32com in - - hidden import and repacked it, it still says no module.

    • PyTutorials
      PyTutorials  Month ago +2

      Did you read the post that is linked at the bottom of every build? If so, what actually is your error (after following the debugging steps)?

    • Adrián
      Adrián Month ago

      @Alphabet No it doesn't. When I run it in python it works fine

  • MagicSebi
    MagicSebi Month ago

    I have this error:
    PermissionError: [WinError 5] access denied: 'C:\\windows\\system32\\output'
    But then it also says 'Completed', but I can't find the output folder, can someone help me?

    • PyTutorials
      PyTutorials  Month ago

      You need to give the script permissions. Like any program you execute, it needs to have permission to write to the location it is writing files to. You are most likely executing this with a current directory in System32, which you have not given the script permissions to write in.

  • Matthew MEL
    Matthew MEL Month ago

    I was a bit hesitant to download this, but after trying it, I had no issues! Can you somehow add support for a module named "pyttsx3"? It's a text to speech module. If you want to experiment with it, you can open CMD and type "pip install pyttsx3". Thanks!

    • PyTutorials
      PyTutorials  Month ago

      Could you provide specific errors? "a module not found error" is quite vauge - a stacktrace would be good.

    • Matthew MEL
      Matthew MEL Month ago

      PyTutorials Pyinstaller doesn’t know what to do with pyttsx3 and when I try to convert it, pyinstaller gives me several errors, and when I open the program (if there is any created) it just closes with a module not found error

    • PyTutorials
      PyTutorials  Month ago

      Support is quite generic for this and relies on pyinstaller. What are the issues with using pyttsx3?

  • Jacob Maciejewski
    Jacob Maciejewski Month ago

    Having an issue with the GUI. I used this a couple days ago to successfully install a .py to an .exe that functioned properly. However, when I now try to run the run.py script, the GUI opens for a second and immediately closes leaving a cmd window that is stuck waiting. Any ideas how to fix this?

    • PyTutorials
      PyTutorials  Month ago

      Have you tried to look for the error that could be occurring? Simply opening this in IDLE or running the script in the terminal should preserve the output (generally the first thing to do when something isn't working).

    • Jacob Maciejewski
      Jacob Maciejewski Month ago

      I do have chrome and python 3.7 installed also

  • Rajan Sharma
    Rajan Sharma Month ago

    This is an amazing customization to pyinstaller. Really awesome!

  • SpringSamurai
    SpringSamurai Month ago

    Way bette rthan pyinstaller. Its so un=pythonic to require people to read through pages of cryptic bullshit just to convery a simple .py with some datafiles and get back a cryptic error. Fuck them, you deserve donations.

    • PyTutorials
      PyTutorials  Month ago

      This is a GUI built on top of pyinstaller, I just tried to abstract the layer a bit with buttons n stuff. I fully support pyinstaller but I do agree, it is a bit unusual that this hadn't been done before me.

  • Kiran Hy
    Kiran Hy Month ago

    setup installed as you said. But, after running python run.py - only chrome browser will open
    what's gone wrong?

    • PyTutorials
      PyTutorials  Month ago

      Are there any errors in the ChromeDev console or 404s in the networking tab?

    • Kiran Hy
      Kiran Hy Month ago

      It just opens chrome browser without any error

    • PyTutorials
      PyTutorials  Month ago

      Right, when you execute auto-py-to-exe in the terminal, what occurs? Are you immediately prompted for more input?

    • Kiran Hy
      Kiran Hy Month ago

      @PyTutorials I'm pointing to Miniconda - python 3.7 installation

    • Kiran Hy
      Kiran Hy Month ago

      @PyTutorials Yes, It just opens blank chrome browser. I cannot see Auto Py to Exe UI

  • Ronald Cáceres
    Ronald Cáceres Month ago

    I ahve a problem, console show me that:
    Traceback (most recent call last):
    File "", line 2, in
    ImportError: No module named _vendor.six
    What is wrong?

    • PyTutorials
      PyTutorials  Month ago

      Give this a shot: github.com/pyinstaller/pyinstaller/issues/3777#issuecomment-426670457

  • RcFabian94
    RcFabian94 Month ago +1

    what an awsome tool !!

  • Евгений  Синельников

    Hello from Ukraine! Good job!

  • Евгений  Синельников

    I kiss you!!!

  • Ahmed Elmanawy
    Ahmed Elmanawy Month ago

    If I have matplolib.py in my cod. it will be converted to exe by your app?

    • Ahmed Elmanawy
      Ahmed Elmanawy Month ago

      @PyTutorials ok i will try again thanks

    • PyTutorials
      PyTutorials  Month ago

      pyinstaller is compatible with 3.7.3 and I have not tested it with matplotlib before.

    • Ahmed Elmanawy
      Ahmed Elmanawy Month ago

      @PyTutorials did the pyinstaller compatible with python 3.7.3 and matplotlib

    • PyTutorials
      PyTutorials  Month ago

      So you are saying that you imported ONLY matplotlib in your script then packaged it and then ran it and it failed to run? What is the error?

    • Ahmed Elmanawy
      Ahmed Elmanawy Month ago

      @PyTutorials I imported matplotlib but can't execute the script.

  • Harmeet Singh Chugga
    Harmeet Singh Chugga Month ago +1

    Thanks

  • MrRiseYT
    MrRiseYT Month ago

    It creates .exe but it doesn't run.

    • PyTutorials
      PyTutorials  Month ago

      Link doesn't work. Did you read that post? It contains help on how to debug the issue and solutions to MANY problems people face.

    • MrRiseYT
      MrRiseYT Month ago

      @PyTutorials My simple game (drive.google.com/open?id=1AtDGooN0pS1vx4FIj34VjmqEHPeNned6) uses tkinter, maybe that is the reason?

    • PyTutorials
      PyTutorials  Month ago

      Did you read the post that is linked at the bottom of the UI after every build?

  • Bobby Singh R
    Bobby Singh R Month ago

    Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: 'c:\\program files\\python37\\Lib\\site-packages\\bottle.py'
    Consider using the `--user` option or check the permissions.
    that was the error message that i got after I went into cmd and typed in, pip install -r requirements.txt
    could you please tell me what went wrong and how i can fix it. Thank you.

    • PyTutorials
      PyTutorials  Month ago

      You need to give the command permissions. Two options:
      1. Run the current terminal with elevated permissions
      2. cd to a directory you have permissions for

  • Endless Void Studios

    this is amazing but i gotta ask why is your convert python to exe program not an exe program :D

    • Endless Void Studios
      Endless Void Studios Month ago

      @PyTutorials ahhh i see thanks that makes a lot of sense

    • PyTutorials
      PyTutorials  Month ago

      When you use this tool, you're packaging a Python script, which means Python is most likely installed as you developed the script (or at least tested that it worked first); so bundling this into an executable is not much use the user should have Python installed.
      For people that don't have Python installed and want to use this tool, in the case of something going wrong, they can not debug or test the original script. That is why I don't want to encourage people using this tool without having Python installed, as it will lead to a lot more complaints with no solutions.

    • Endless Void Studios
      Endless Void Studios Month ago

      @PyTutorials just making it easier to run and distribute

    • PyTutorials
      PyTutorials  Month ago

      What would be the use of this in an exe form?

    • Endless Void Studios
      Endless Void Studios Month ago

      @PyTutorials i see thanks is that why you're tool is not just an exe?

  • Alexis Guaman Figueroa

    Hi, Thanks & Congratulations, just, I want to tell you, I have a problem with libraries that I use on my script, so, how can I solve it, help me please. eg. (ModuleNotFoundError: No module named 'sklearn')

    • PyTutorials
      PyTutorials  Month ago

      Did you read the post that is linked at the bottom of the ui after every build? I cover this in the post: nitratine.net/blog/post/issues-when-using-auto-py-to-exe/#modulenotfounderror-no-module-named-x-importerror-no-module-named-x

  • Shrey Joshi
    Shrey Joshi 2 months ago +1

    Does this work with Python 3.7?

    • PyTutorials
      PyTutorials  2 months ago

      Fixed, released and published to PyPI. Once again, thanks for pointing this out.

    • PyTutorials
      PyTutorials  2 months ago

      Never actually planned on anyone using a development version on PyInstaller, but this is a good edge case that I will take into account. Thanks for bringing this up, I'll get it fixed soon.

    • Shrey Joshi
      Shrey Joshi 2 months ago +1

      @PyTutorials Turns out I was running the developer version of pyinstaller, so when the __main__ python file ran when it was called from run.py, it was unable to perform the comparison between versions to check if a sufficiently latest pyinstaller version was running. It was attempting to convert "3.5.dev0+5d872d3ee" from "pyinstaller.3.5.dev0+5d872d3ee" to an int and compare with 3.4. I fixed it by commenting out the section of code that was checking the versions since I knew I was running the right versions, but this is just a bug you guys might want to patch. (Not pointing fingers, just giving a suggestion for an improvement).

    • PyTutorials
      PyTutorials  2 months ago

      Yep, added support a few months ago

  • Prakhyath Karyamsetty
    Prakhyath Karyamsetty 2 months ago

    will this exe created in windows work on mac?

    • PyTutorials
      PyTutorials  2 months ago

      Using this method, no, PyInstaller is not a cross compiler (as noted in the docs).

  • Dagson Souza
    Dagson Souza 2 months ago

    how to use with OpenCV?

    • PyTutorials
      PyTutorials  2 months ago

      Just import the module in the script? I have had people saying they had issues with missing files, but you can locate those when debugging (noted in the post that is linked at the bottom of the auto-py-to-exe UI after every build).

  • Mars
    Mars 2 months ago

    Hi, Great video , but I have an error, when I try to exectute the output .exe file , it says: Failed to execute Script 'Name'. Can someone help me ?

    • Mars
      Mars 2 months ago +1

      @PyTutorials I will check for an answer there and I'll be back, thanks again

    • PyTutorials
      PyTutorials  2 months ago

      After every time you package a Python script, above the two buttons at the button, there is text that says "Something wrong with your exe? Read this post on how to fix common issues for possible solutions." Did you read this?

    • Mars
      Mars 2 months ago

      @PyTutorials Thanks for the reply, do you mean the output of the AutoPyToExe?

    • PyTutorials
      PyTutorials  2 months ago

      Did you read the post that is linked at the bottom of the ui after every conversion?

  • Arpita Sharma
    Arpita Sharma 2 months ago

    I am not able to run the output file (exe file), the command prompt just opens for a while and then closed automatically.

    • PyTutorials
      PyTutorials  2 months ago

      I talk about this at nitratine.net/blog/post/issues-when-using-auto-py-to-exe/#how-do-i-convert-all-my-python-files (in the same post you read) : "Add the entry point in the script location. PyInstaller searches for imports to get the rest of the Python files required to run, so as long as you use the import keyword, your files will be added."
      Since you are using selenium, make sure to add the webdriver so it can be accessed by the executable (might need to add it to additional files).

    • Arpita Sharma
      Arpita Sharma 2 months ago

      @PyTutorials Problem solved. Now the cmd is stable. Thanks.
      One more query: How to convert more than one file as one which are dependant on each other. Like we have a file with all the tests and one file with all the functions used in the file tests.Then how to make its executable file. I am working on selenium webdriver with python.

    • PyTutorials
      PyTutorials  2 months ago

      Did you read the post that is linked at the bottom of the ui after every conversion?

  • Abhishek Yadav
    Abhishek Yadav 2 months ago

    Hey! this time I broke my code in parts and converted it into exe file and I found that adding extra files was not the real problem. The real problem was that the font style which I was using in my python program was not supported by my pc and that's why the exe file was not running. Now, my exe file is running smoothly. Thanks for your help man!

    • PyTutorials
      PyTutorials  2 months ago

      Oh cool, glad you figured it out!

  • morgengabe1
    morgengabe1 2 months ago

    I tried to use it on itself, but received:
    "Fatal error detected
    ![inscribed in a triangle] Failed to Execute script run".
    I used the git clone command in Bash to acquire the repository.
    I like the way it looks, your program, it's user friendly and attractive.

    • PyTutorials
      PyTutorials  2 months ago

      No, it was not rhetorical at all. I was asking if you read the post I wrote on the most common issues with auto-py-to-exe. I try really hard to provide a good resource for debugging but people seem to just ignore it.
      I recommend you read the content next time, it is very helpful: nitratine.net/blog/post/issues-when-using-auto-py-to-exe/#fatal-error-failed-to-execute

    • morgengabe1
      morgengabe1 2 months ago

      @PyTutorials Hmm, well I think it's ultimately fine because I also ran it on a simple wage-calculator script and it worked fine. The issue isn't your 'fault', afaik. Just a little surprising lol

      For whatever it's worth:
      I tried again with setup.py and it opened a cmd instance but it was too fast to read. I tried to troubleshoot but no luck. Now I've re-compiled run.py but the pop up window I mentioned doesn't show up anymore when I try to execute but it also gave a super fast cmd I couldn't read. So while I'm not sure if your questions are rhetorical or not, I couldn't tell you a valuable answer.
      Edit
      I did check the link, but I'm not sure what I'm looking for on that page.

    • PyTutorials
      PyTutorials  2 months ago

      Did you read the post that is linked at the bottom of the UI at the end of every build? If so, what is the actual error?

  • 24 GAMING
    24 GAMING 2 months ago +1

    can we just use: pip install auto-py-to-exe?
    and BTW, I transferred my .py file to .exe file. But when I tried to run it on a pc without having python *at all* there was an error that say, that I missing some python 37 file in my AppData. Do you know how to fix it?

    • 24 GAMING
      24 GAMING 2 months ago +1

      @PyTutorials
      That post solved only the second half of the problem😅. The first half solved when I updated my auto-py-to-exe....
      (As I wrote in my second respond)

    • PyTutorials
      PyTutorials  2 months ago +1

      This post is linked at the bottom of the ui after every build. I highly recommend reading help content that is given to you next time - you would have solved this a lot quicker .

    • 24 GAMING
      24 GAMING 2 months ago +2

      ​@PyTutorials
      I did some tests. And for now, it really was because I tried on 32-bit pc. (It worked on the 64-bit). Thanks A lot! you really helped me! You earned a new sub.

    • PyTutorials
      PyTutorials  2 months ago +1

      Interesting, did you read nitratine.net/blog/post/issues-when-using-auto-py-to-exe/#the-exe-doesnt-work-on-another-computer

    • 24 GAMING
      24 GAMING 2 months ago +1

      @PyTutorials
      *
      Error.
      Can not exexute the program because you messing the file
      api-ms-win-crt-runtime-|1-1-0.dll
      Try to reinstall the program to solve this problem.
      *
      (I tride 5 tims it doesn't work)
      Can it be because it was a non win10 PC?

  • Озар Айни
    Озар Айни 2 months ago

    Thanks for this video, it works on my computer, however when I try to check on other computers it says: "Failed to execute". How can I fix it?

    • PyTutorials
      PyTutorials  2 months ago

      How do you know this is the issue? It is running isn't it? Maybe look at this: nitratine.net/blog/post/issues-when-using-auto-py-to-exe/#fatal-error-failed-to-execute

    • Озар Айни
      Озар Айни 2 months ago

      @PyTutorials, yes I did. It says: "Fixing this and repackaging is the solution to this issue". How can I fix this and repackage?

    • PyTutorials
      PyTutorials  2 months ago

      Did you read the post that is linked at the bottom of the UI at the end of every build?

  • Rick Kurniawan
    Rick Kurniawan 2 months ago +1

    that's amazing dude!! thanks for tutorial

  • Scott Lane
    Scott Lane 2 months ago

    Great tool, thank you but whenever I made it through the whole process and once I click on the finished application it opens and instantly closes, any ideas?

    • PyTutorials
      PyTutorials  2 months ago

      Did you read the post linked at the bottom of the UI at the end of each build?

  • nyytZ
    nyytZ 2 months ago

  • Rafay Jiwani
    Rafay Jiwani 3 months ago

    awesome but how to add database file in additional files

    • PyTutorials
      PyTutorials  3 months ago

      There is an additional files tab; add it in this. Set the destination to a path relative to the root of where you expect the database to be.

  • Kiwi
    Kiwi 3 months ago +1

    What kind of trickery is this? Are you a magician? Really though thank you this helped so much :)

    • PyTutorials
      PyTutorials  3 months ago

      Haha, no magic here; I'm it was useful!

  • DMDP-Road inventory and Condition using apps

    in the app i get this"79461 INFO: Building EXE from out00-EXE.toc completed successfully.
    Moving project to: C:\MPYA\Python\auto-py-to-exe-master\auto-py-to-exe-master\output
    Complete"
    BUT
    in Console upon executing i receive this message "Fatal Python error: initfsencoding: unable to load the file system codec
    zipimport.ZipImportError: can't find module 'encodings'

    Current thread 0x00002f90 (most recent call first):"

    What might be the problem? Please

    • DMDP-Road inventory and Condition using apps
      DMDP-Road inventory and Condition using apps 3 months ago +2

      @PyTutorials Let me document this Sir!
      Thank you alot Mr Brent

    • PyTutorials
      PyTutorials  3 months ago +1

      A better option for next time would be to use pip to install/update auto-py-to-exe (I put it on PyPI after making the video) using `python -m pip install auto-py-to-exe --upgrade`. Aside from that, good job on getting it working!

    • DMDP-Road inventory and Condition using apps
      DMDP-Road inventory and Condition using apps 3 months ago +1

      ​@PyTutorials Now i know, previous tutorial i used last year i had python 3.6, so this time i have
      3.7 i did not manage to work it out ,i.e if i could update my pyinstaller it could have worked for 3.7. Anyway i have now an app for you sir Mr brent and pyinstaller. THANK YOU IT HAS WORKED i am now following you in Github ,THANKS AGAIN

    • PyTutorials
      PyTutorials  3 months ago +1

      auto-py-to-exe hash updated now and requires a more recent version of PyInstaller as stated in setup.py and requirements.txt in the repository.

    • DMDP-Road inventory and Condition using apps
      DMDP-Road inventory and Condition using apps 3 months ago

      @PyTutorials It has upgraded now,let me re-run the auto py

  • אופיר ראובן
    אופיר ראובן 3 months ago

    After i do cd C:\Users\ovadiya\Downloads\auto-py-to-exe-master (1)\auto-py-to-exe-master
    i see 'pip' is not recognized as an internal or external command...
    What i need to do?

    • PyTutorials
      PyTutorials  3 months ago

      If you watch the beginning of the video, at 0:34 I talk about watching my other video at ru-clip.net/video/cm6WDGAzDPM/video.html on how to setup pip.

    • gxg lti
      gxg lti 3 months ago +1

      ru-clip.net/video/cm6WDGAzDPM/video.html

  • Mostafa Gafer
    Mostafa Gafer 3 months ago +1

    this video and your project is one of the greatest inventions in python programming, a million thanks to you.

  • ELENA GARCIA DIAZ
    ELENA GARCIA DIAZ 3 months ago

    I am using python with the library wxwidgets for python. The executable is generated but the computer is unable to execute it . What can i do ?

    • PyTutorials
      PyTutorials  3 months ago

      Those are just warnings, you will notice I have them in the video also; nothing to worry about. Did you see a link appear at the bottom of the UI after packaging was complete? If you read the post, you would find there is help on a missing module: nitratine.net/blog/post/issues-when-using-auto-py-to-exe/#modulenotfounderror-no-module-named-x-importerror-no-module-named-x

    • ELENA GARCIA DIAZ
      ELENA GARCIA DIAZ 3 months ago

      When the program is being converted to executable some warnings appear (78267 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of +(the path to python) and when I try to execute it , a message ( No module named 'wx') appears in the console.

    • PyTutorials
      PyTutorials  3 months ago

      How is it unable to execute it? What is the error?

  • 정기엽
    정기엽 3 months ago

    Thanks for help!! It works. But I have some problem. When I print out big dataframe in the exe, the result is crushed. So I want to lengthen console's width with drag. Can I fix in options of your program? or How to solve with python code? I use python 3.7. Thanks!!

    • 정기엽
      정기엽 3 months ago

      @PyTutorials Aha! I got it. I'll try it with tkinter. really thanks!! Wish you all the best!!

    • PyTutorials
      PyTutorials  3 months ago

      Sorry, when I said "making your own window", I mean't program your own GUI of some sort (can look like the terminal if you want) that you can use to output messages and resize programmatically. When you have made your own GUI, you can use the "Window Based" button to hide the terminal that will still appear. If you are learning tkinter then great, you can use that; there are plenty of options for Python GUI's.

    • 정기엽
      정기엽 3 months ago

      @PyTutorials You are right. I have created no GUI and the OS. What is mean "making your own window"? Is that mean button 'Window Based (hide the console)' in your program? If I make 'console based', It works what I talked before. But If I make 'Window Based', there are message 'Failed to execute script'. What is the difference between two options? What should I study? For the moment, I'm trying to making display code from the tkinter. I really appreciate your kindness.

    • PyTutorials
      PyTutorials  3 months ago +1

      So I'm going to assume you have created no GUI and the OS is providing the native terminal for output to be displayed. In this case, you can't, this terminal window is not attached to your script/exe apart from being able to provide a way to output text. I recommend making your own window for output so you can control it.

  • kriztian9000
    kriztian9000 3 months ago

    ive already tried a lot of things but i cannot make my compile to work with normal pyinstaller or other versions, nor with this tool (which is great btw) but it just keeps getting me the same error "WARNING: Cannot read QLibraryInfo" with a bunch of other PyQt5 errors. already tried almost everything about this topic. But now the app just dies while converting.. i dont know if it is supposed to take so much time wich i think it shouldnt. Any kind of help would be appreciated.

    • PyTutorials
      PyTutorials  3 months ago

      Did you say it crashes while packaging? I recommend you search the error up and read GitHub issues like github.com/pyinstaller/pyinstaller/issues/3551 . Unless you give some actual I cannot help too much apart from what you say.

  • sa fa
    sa fa 3 months ago

    hello ! i did all these process and i get my exe version with succes but when i run it , an error came up that says : failed to execute script of file_name.py
    My script is kind of bit long with too many pictures and i used on it tkinter framework, anyway can u give some advice.. i searched everywhere and still not working

    • PyTutorials
      PyTutorials  3 months ago +1

      Did you read the post that is linked at the bottom of the UI after each build? If so, what is the real error?

  • Chas breisinger
    Chas breisinger 3 months ago

    Once i do the whole process once and everything is downloaded is there a faster way to get back onto it to import another .py?

    • PyTutorials
      PyTutorials  3 months ago

      What do you mean by getting "back onto it to import another .py"? I don't quite understand sorry.

  • Jacky
    Jacky 3 months ago

    not working in my project

    • PyTutorials
      PyTutorials  3 months ago

      How is it not working? Could you give some details?

  • FailedTest Subjet
    FailedTest Subjet 3 months ago +1

    Can you add a search for path for the version file? the --version command needs a file path

    • PyTutorials
      PyTutorials  3 months ago

      Cool, that proves that this is PyInstaller related and doesn't have anything to do with auto-py-to-exe. I have looked at the issues in the repo for PyInstaller ( github.com/pyinstaller/pyinstaller/issues?utf8=%E2%9C%93&q=--uac-admin ) and haven't seen anything pop up relating to this in a couple of years.
      I am not sure why this is not occurring as I have never needed to use the --uac-admin flag myself. Maybe you could open a issue on their GitHub repo providing all the information you can; they may have some answers I don't have.

    • FailedTest Subjet
      FailedTest Subjet 3 months ago

      ​@PyTutorials it doen't ask for elevation it just runs the code directly, and thank you for updating your code.

    • PyTutorials
      PyTutorials  3 months ago

      You can find the command you can run at the bottom of the auto-py-to-exe UI after selecting everything.

    • PyTutorials
      PyTutorials  3 months ago

      If you build your script with PyInstaller (it will be installed now if you have auto-py-to-exe installed) with the `--uac-admin` flag, does it ask for elevation?

    • FailedTest Subjet
      FailedTest Subjet 3 months ago

      ​@PyTutorials one question, why when i use the --uac-admin, and i run the exe, it doen't asks for admin.

  • #Conditioner
    #Conditioner 3 months ago +1

    I get *Failed to execute script* error msg. I have a simple python file that just opens an html file like this *os.startfile('a.html')*

    • PyTutorials
      PyTutorials  3 months ago

      Ah right, sorry; these comments were flagged due to the url. My fault.
      Are you running the output executable as a Python script? It is not a Python script once it has been packaged, it is no an executable. Look here: github.com/pyinstaller/pyinstaller/issues/1800 (this was found by searching the error in the pyinstaller github repo's issues tab).

    • #Conditioner
      #Conditioner 3 months ago

      @PyTutorials SyntaxError: Non-UTF-8 code starting with '\x90' in file b.exe on line 1, but no encoding declared; see python.org/dev/peps/pep-0263/ for details

    • PyTutorials
      PyTutorials  3 months ago

      Did you read the post? What error are you getting?

    • #Conditioner
      #Conditioner 3 months ago

      @PyTutorials basically this is my code:
      import os
      # This Python file uses the following encoding: utf-8

      os.startfile('a.html')

    • #Conditioner
      #Conditioner 3 months ago

      @PyTutorials

      SyntaxError: Non-UTF-8 code starting with '\x90' in file b.exe on line 1, but no encoding declared; see python.org/dev/peps/pep-0263/ for details

  • Arthur HQ
    Arthur HQ 3 months ago +1

    What GUI framework did you use to build that app? it is Beautiful.

    • Arthur HQ
      Arthur HQ 3 months ago +1

      @PyTutorials Thank you, I will check that framework.

    • PyTutorials
      PyTutorials  3 months ago

      It's a very small framework called Eel; I did a basic video on it at ru-clip.net/video/2kbeBzEQfXE/video.html . The source of auto-py-to-exe is at github.com/brentvollebregt/auto-py-to-exe if you want to look at how I used it.

  • Stephen McCutcheon
    Stephen McCutcheon 3 months ago

    During the pip install -r requirements.txt, it starts but just sits with installing build dependencies, any idea why?

    • PyTutorials
      PyTutorials  3 months ago

      Try installing with `pip install auto-py-to-exe`. You will find this is a lot more smooth.

  • NIVIDU LAKSHIKA
    NIVIDU LAKSHIKA 3 months ago

    Do you know how to distribute an exe file on website? And what are the websites for it?

    • PyTutorials
      PyTutorials  3 months ago

      To distribute an exe file on a website (you own) you would use the same method you use to host the js/css or other files and use an `a` tag to the location. Other websites you can use are Google drive, Dropbox and other file sharing sites.

  • Mia Chan
    Mia Chan 3 months ago

    dwonlod link PY to EXE Automatically

    • PyTutorials
      PyTutorials  3 months ago

      @md Nurchan what is X-ray?

    • md Nurchan
      md Nurchan 3 months ago

      Python programming does not run in X-ray

    • PyTutorials
      PyTutorials  3 months ago

      Yes as in it worked?

    • Mia Chan
      Mia Chan 3 months ago

      @PyTutorials yes

    • PyTutorials
      PyTutorials  3 months ago

      Sorry, is this a question? You can download auto-py-to-exe using pip

  • Moussa COULIBALY
    Moussa COULIBALY 3 months ago

    Hi,
    I’m using eel in a project and facing actually to a probleme to make my scritp an executable of my script. With auto-py-to-exe (same issue with PiInstaller) : I’m facing to this error : AttributeError: 'str' object has no attribute 'items'
    And with cx_freeze I’m facing to this one : Traceback (most recent call last):
    File "C:\Python\Python36\lib\site-packages\cx_Freeze\initscripts\__startup__.py", line 14, in run
    module.run()
    File "C:\Python\Python36\lib\site-packages\cx_Freeze\initscripts\Console.py", line 26, in run
    exec(code, m.__dict__)
    File "srvcom.py", line 6, in
    File "C:\Python\Python36\lib\site-packages\eel\__init__.py", line 7, in
    import bottle.ext.websocket as wbs
    File "C:\Python\Python36\lib\site-packages\bottle.py", line 1797, in load_module
    __import__(realname)
    ModuleNotFoundError: No module named 'bottle_websocket'

    Any help will be appreciated.

    My setup script

    from cx_Freeze import setup, Executable

    setup(
    name = "test",
    version = "0.1",
    description = "Eel TEST",
    executables = [Executable("test.py")]
    )

    My test script

    import eel
    import time

    eel.init('web')

    @eel.expose
    def getTime():
    return time.strftime('%c')

    try:
    eel.start('main.html')
    except (SystemExit, MemoryError, KeyboardInterrupt):
    # We can do something here if needed
    # But if we don't catch these safely, the script will crash
    pass

    print ('This is printed when the window is closed!')

    from cx_Freeze import setup, Executable

    Error with pyinstaller:
    When I try pyinstaller test.py
    This error occurs: AttributeError: 'str' object has no attribute 'items'
    In this case I didn't even get the exe file!

    • Moussa COULIBALY
      Moussa COULIBALY 3 months ago

      Thanks dude. Thanks to your advice I was able to generate an exe, even it gives me error when I try to execute it. I resolve it in combination this Stackoverflow issue: stackoverflow.com/questions/53682719/python-no-module-named-bottle-websocket-when-running-an-executable-made-with. You've been very helpful!

    • PyTutorials
      PyTutorials  3 months ago

      Remember, GitHub issues for the package you are using can provide a significant amount of help for common issues (also due to people reporting the same thing multiple times). StackOverflow is good but other resources can be better at times.

    • Moussa COULIBALY
      Moussa COULIBALY 3 months ago

      Yes I did. But I was focussed on Stackoverflow solutions and was looking for a solution using cx_freeze. I'll try this and keep you posted! Thanks for your help.

    • PyTutorials
      PyTutorials  3 months ago

      Did you search the error in Google? The second result for me points to github.com/pyinstaller/pyinstaller/issues/3507 ; did you try `pip install setuptools --upgrade`?

  • emidiomata1
    emidiomata1 3 months ago

    Im getting alot of trouble because windows defender thinks that there is a virus in the pyinstaler, if i disable the defender and run auto-py-to-exe the result is considered trojan and it is deleted. this didnt happen before, i dont know what happened. Can someine help me?

    • PyTutorials
      PyTutorials  3 months ago

      The only option really is to disable the antivirus program due to them being at fault as they have detected a false positive.

  • Idriss EL MESBAHI
    Idriss EL MESBAHI 3 months ago

    Hey man! Recently, I have some issues creating it.
    Firstly, I have a warning "Failed to execute the script" even if I tried to open it using the terminal
    Secondly, during the creation, I have a lot of messages like this :
    WARNING: lib not found: api-ms-win-crt-time-l1-1-0.dll dependency of C:\Python36\DLLs\tk86t.dll
    3126473
    even if I tried to reinstall "Microsoft visual C++ 2015"
    Thanks

    • PyTutorials
      PyTutorials  3 months ago

      The WARNING output are warnings, not errors; so they most likely do not contribute (I have never seen them relate to) the cause of an error somewhere else.

    • PyTutorials
      PyTutorials  3 months ago

      No, I do not have this issue in the video. Did you read the link that appears at the end of each build in the UI asking "Something wrong with your exe?"? I highly recommend taking a look at that link ( nitratine.net/blog/post/issues-when-using-auto-py-to-exe/ ) as it tells you how to find the error that you are missing.

    • Idriss EL MESBAHI
      Idriss EL MESBAHI 3 months ago

      It seems that you have the same problem in the video, right?

  • So De
    So De 3 months ago

    Very useful tool. I tried it with several scripts and it works! Thank you for great work!

  • Ang Su
    Ang Su 3 months ago

    I tried this but it's saying 'Failed to execute the script' when i click the exe file at the end. TT

    • PyTutorials
      PyTutorials  3 months ago

      Did you follow the link that appears at the bottom of the UI at the end of each build? This tells you how to find the error. What was the error?

  • laksh aithani
    laksh aithani 4 months ago

    I'm getting 'Error: Eel not found' even though I've done pip install Eel and it went through with no errors.

    • laksh aithani
      laksh aithani 4 months ago

      @PyTutorials one sec I'll give you the full error in the minute. I tried to manually compile with pyinstaller but I'm getting an error to do with it being unable to find nltk data. Will provide more details on that too in a bit

    • PyTutorials
      PyTutorials  4 months ago

      Is that actually the error? Could you provide the full error? Also please give some context of where this is occurring as this video is on packaging .py to .exe and doesn't have much to do with Eel so I have no clue where this could be appearing.