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 548

  • laksh aithani
    laksh aithani 13 hours 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 10 hours 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  10 hours 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.

  • allMyCode - Developer
    allMyCode - Developer 16 hours ago

    Is there a difference between converting my script with the GUI version or when I type in the command directly in powershell as you have already showed in another tutorial?

    • PyTutorials
      PyTutorials  10 hours ago

      In most cases no, the GUI simply helps you know what options there are and helps with the process of adding additional files.

  • Gerald Louis
    Gerald Louis 3 days ago +1

    Perfect man, can't wait to try it out. In the mean time i'm playing with Qt, which I was already planning to learn but didn't came across something so clear as your tutorial. By the way, this interface that you made was done with PyQt? I loved it.

    • PyTutorials
      PyTutorials  2 days ago

      The interface in this video uses Chromes App mode that is called using a package called Eel. I made a small video on how to use Eel if you are curious: ru-clip.net/video/2kbeBzEQfXE/video.html

  • baphnie
    baphnie 3 days ago

    I'd love to be able to specify a default window size for my exe, if possible. Great videos!

    • PyTutorials
      PyTutorials  2 days ago

      Best way would be to create your own gui and set it that way.

  • Mohit Jain
    Mohit Jain 3 days ago

    i was not able to convert it.. I cant see file

    • PyTutorials
      PyTutorials  Day ago

      I've just pushed a commit to GitHub. Clone/download the repo and see if this commit has fixed it (it is not on PyPi yet so no pip)

    • Mohit Jain
      Mohit Jain 2 days ago

      +PyTutorials windows

    • PyTutorials
      PyTutorials  2 days ago

      What OS are you using?

    • Mohit Jain
      Mohit Jain 2 days ago

      +PyTutorials explorer is not recognized as an internal or external command

    • Mohit Jain
      Mohit Jain 2 days ago

      +PyTutorials It said converted... see the output folder.... but there is no output folder.... i changed the output path.... but the exe file was not there in the given path as well

  • skartd Sbolans
    skartd Sbolans 4 days ago +1

    it doesn't make any output folder :/

    • skartd Sbolans
      skartd Sbolans 2 days ago

      +PyTutorials i did read the error. Thanks for the help.

    • PyTutorials
      PyTutorials  2 days ago

      Did you read the error? Did you read the link that is displayed in those screenshots? I highly recommend you read that because it actually covers this exact error... I wrote this post so people that tell me it's no working can find a solution for what they have done wrong; "PermissionError" can be found at nitratine.net/blog/post/issues-when-using-auto-py-to-exe/#permissionerror-errno-13-permission-denied

    • PyTutorials
      PyTutorials  3 days ago

      Or you can upload them to an image sharing site and put the links here. I only help people regarding these topics in RU-clip comments for particular reasons.

    • skartd Sbolans
      skartd Sbolans 3 days ago

      +PyTutorials here i have some screen shots:imgur.com/a/doWVTBg

    • skartd Sbolans
      skartd Sbolans 3 days ago

      +PyTutorials do you use discord? i can give you screenshot with the errors

  • Francisco Castillo
    Francisco Castillo 5 days ago

    thanks for this, Im getting an error saying:
    Error: PyInstaller not found
    Please install PyInstaller using: "python -m pip install PyInstaller"
    then when i try running "python -m pip install PyInstaller" it says
    "no module named pip if anyone could help that would be great

    • PyTutorials
      PyTutorials  5 days ago

      Did you watch the video? At 0:30 I say if pip isn't set up, follow my other video: ru-clip.net/video/cm6WDGAzDPM/video.html. Also if you can't figure out how to fix it using that video, check the description on that video for a link to a blog post on the video that describes it in writing.

    • Francisco Castillo
      Francisco Castillo 5 days ago

      and pip is installed on my machine( im on mac)

  • Mateusz Ejsmont
    Mateusz Ejsmont 8 days ago +1

    Thank you so much! This tutorial helped a lot!

  • ADFFLAME
    ADFFLAME 11 days ago

    help ! if i move the file an error appears Its : Fatal Error :Failed To execute the code !

    • PyTutorials
      PyTutorials  11 days ago +1

      There is a post that is linked at the end of every build. Did you read it? If so, what is the error?

  • Vikas Chaudhary
    Vikas Chaudhary 14 days ago

    Hey, this is an awesome tutorial, I am having more than one .py file in my project, how can I create the exe file?

    • PyTutorials
      PyTutorials  14 days ago

      "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.", source: nitratine.net/blog/post/issues-when-using-auto-py-to-exe/#how-do-i-convert-all-my-python-files

  • FailedTestSubjet
    FailedTestSubjet 16 days ago

    Are you going to add --clean?
    I am not sure if you purposely didn't put it in there or you forgot about it.

    • FailedTestSubjet
      FailedTestSubjet 16 days ago

      +PyTutorials Sorry the button is a bit too hard for me to see it. :)

    • PyTutorials
      PyTutorials  16 days ago

      Have you looked in the Advanced tab at all??? I am 100% sure it is in there; should be a button right under -a...

  • FailedTestSubjet
    FailedTestSubjet 16 days ago

    search button doesn't work

    • FailedTestSubjet
      FailedTestSubjet 16 days ago

      +PyTutorials Ok thank you

    • PyTutorials
      PyTutorials  16 days ago

      Yes it does. The window may have appeared in the background based on your OS.

  • Pedro Biel
    Pedro Biel 16 days ago

    Hi, I'm using Python 3.7 and Anaconda3. When I run the app this error shows up:
    An error occurred, traceback follows:
    ...
    File "C:\Users\pjbie\Anaconda3\lib\site-packages\PyInstaller\utils\hooks\qt.py", line 514, in add_qt5_dependencies
    # Change plugins into binaries.
    File "C:\Users\pjbie\Anaconda3\lib\site-packages\PyInstaller\utils\hooks\qt.py", line 132, in qt_plugins_binaries
    """
    File "C:\Users\pjbie\Anaconda3\lib\site-packages\PyInstaller\utils\hooks\qt.py", line 117, in qt_plugins_dir
    raise Exception("""
    Exception:
    Cannot find existing PyQt5 plugin directories
    Paths checked: C:/qt64/qt_1544645195969/_h_env/Library/plugins
    Project output will not be moved to output folder
    Complete.
    ---
    What should I do?

    • PyTutorials
      PyTutorials  14 days ago

      Have you tried any other solutions mentioned in the links you provided? The one at stackoverflow.com/a/52844042 looks like a decent solution. Although in the general sense, have you actually tried to properly install PyQt5 using `pip intall PyQt5`? Anaconda causes a lot of issues in these areas.

    • Pedro Biel
      Pedro Biel 14 days ago

      In my case, both packages Pyinstaller and PyQt5 are in the same subfolder in the Anaconda’s folder (..\Anaconda3\Lib\site-packages).

    • PyTutorials
      PyTutorials  15 days ago

      Yes, I have seen this before. If you are using PyQt5, make sure the PyQt5 package is installed in the same environment as pyinstaller; this is where I see most of these errors (in environments like annaconda)

    • Pedro Biel
      Pedro Biel 15 days ago +1

      When I convert code that doesn’t use PyQt5 your app works fine, but if I use PyQt5, something gets wrong. When I follow your advice, I get the executable, but it doesn’t work.
      It seems to be an issue of PyQt or pyinstaller, as far as I have found out.
      stackoverflow.com/questions/52376313/converting-py-file-to-exe-cannot-find-existing-pyqt5-plugin-directories/52376965
      github.com/pyinstaller/pyinstaller/issues/3750

    • PyTutorials
      PyTutorials  16 days ago

      You have PyQt5 installed and it is trying to bundle it even though you don't need it (do you?). If not, add PyQt5 to --exclude-module in the advanced tab and then repackage.

  • Sai Anirudh
    Sai Anirudh 18 days ago

    Amazing work. I have one question is there any way we can encrypt our Python py code file to exe with some key value?

    • PyTutorials
      PyTutorials  18 days ago

      What do you mean exactly; encrypt the stored Python bytecode or encrypt the access to the executable? If you want to encrypt the stored Python bytecode, read this pyinstaller.readthedocs.io/en/stable/usage.html#encrypting-python-bytecode ; auto-py-to-exe contains the --key field. If you want to encrypt the access to the executable, you will have to implement that yourself.

  • A. Chadi
    A. Chadi 18 days ago

    Hello sir ! I compile to exe and when i click the app it gives me a msg box error : " Failed to execute script pyi_rth_qt4plugins

    • PyTutorials
      PyTutorials  18 days ago +1

      You would have also been able to add these to --exclude-modules to save yourself from uninstalling them. Or even using a cleaner virtual environment would have worked well. Just thoughts for next time.

    • A. Chadi
      A. Chadi 18 days ago

      +PyTutorials i actually didn't read it, but thank you sir, i solved it by uninstalling Pyqt4 and 5 and Also pyqtgraph and pyside,
      Thank you

    • PyTutorials
      PyTutorials  18 days ago

      Did you read the post that appears after every build? If so, what actually is the error?

  • SpinkyGR
    SpinkyGR 19 days ago +1

    Hello there. I converted the keylogger from your keylogger tutorial from py to exe. It still works but instead of running in the background there is now an open empty cmd-like window. Any help will be useful please to make it run in the background as a .exe file.

    • PyTutorials
      PyTutorials  19 days ago

      At 1:48 I shows you where to decide if you want a console window or not. Also reading the description is just as helpful as watching the video. If you looked at the link by "Having some issues? Read this first to clear some things up: ", nitratine.net/blog/post/issues-when-using-auto-py-to-exe/#layout-of-the-interface-and-what-things-do

  • Stefan Frei
    Stefan Frei 20 days ago +1

    Excellent!!! Thanks a lot!

  • Vanshu Galhotra
    Vanshu Galhotra 21 day ago +1

    Thanks it works for me

    • PyTutorials
      PyTutorials  20 days ago +1

      I am sorry, but definitely not. I provide tutorials on these Python topics for free. I literally gave this tool away that took me hours to make for FREE. I do it for free as they are community projects. Your project however is not.

    • Vanshu Galhotra
      Vanshu Galhotra 20 days ago

      Ok can i send u the code or exe file to convert to apk

    • Vanshu Galhotra
      Vanshu Galhotra 20 days ago

      Ok then make a video to convert exe to apk and mail me plzz at vanshugalhotra3332@gmail.com

    • PyTutorials
      PyTutorials  21 day ago +1

      I would love to do a tutorial on Python to APK files but I have too many reasons not to. One reason is that the process is not extensively documented, so finding information other than what I provide is difficult (relates to reason 3). Second is that it will be easier and more beneficial to just write it in Java in the long run. Reason three is that I already get LOTS of people complaining about videos like this one (auto-py-to-exe) and how "it doesn't work" (which I fully know they never read the help article). If I make something as advanced as py->apk, it could backfire quite a bit on me.
      Sorry, but until more methods are presented, I will have to hold this one off.

    • Vanshu Galhotra
      Vanshu Galhotra 21 day ago +1

      Plz make how to convert py to apk
      Or
      Exe to apk

  • Kai An Yeo
    Kai An Yeo 22 days ago

    Hi Sir! i keep getting this error. How should i solve it.
    AttributeError: 'str' object has no attribute 'items'

    Project output will not be moved to output folder
    Complete.

    cheers!

    • Kai An Yeo
      Kai An Yeo 21 day ago +1

      +PyTutorials thanks! it's working well! I cant express my gratitude enough! Thanks so much! cheers! :)

    • PyTutorials
      PyTutorials  21 day ago

      Use the Window Based option in the second set of buttons.

    • Kai An Yeo
      Kai An Yeo 21 day ago

      +PyTutorials Hi brent! I managed to solve the issue and converted into an exe! Really grateful for your app! been stuck at converting my file for weeks. Just a quick qn, by any chance am i able to close the command prompt without closing my GUI at the same time? (Both of them are called upon when i double click the exe)

    • PyTutorials
      PyTutorials  22 days ago

      Also sorry for the late reply, you got flagged as spam due to the excessive amount of text content.

    • PyTutorials
      PyTutorials  22 days ago

      Right, please use pastebin or something similar next time for this much output; putting output into three separate comments makes things more effort for me.
      Did you actually search the error in Google? The third result is to pyinstaller's GitHub page which is a dependency of this tool. I recommend you read this: github.com/pyinstaller/pyinstaller/issues/3507
      Tips for next time: Use pastebin when showing a large amount of output and search your errors in Google.

  • Xboxplayer 241
    Xboxplayer 241 22 days ago

    I have a permission error
    what can I do ?

    • PyTutorials
      PyTutorials  22 days ago

      Give it permissions. Or maybe cd to a different directory, I don't recommend doing tasks from System32.

  • Fares Adly
    Fares Adly 23 days ago

    This is the error I get after I type run.py in the command prompt. line 997, in _execute_child
    startupinfo)FileNotFoundError: [WinError 2] The system cannot find the file specified

    • PyTutorials
      PyTutorials  23 days ago

      The error is telling you that it cannot find the file specified. Are you in the correct directory? Might pay to make sure the file actually exists (execute `dir` on windows or `ls` on linux); maybe even use tab completion to verify this.

  • aryaneel shivam
    aryaneel shivam 23 days ago +1

    thanks a loooot!! sir, there was a moment where i was actually getting annoyed with python. buut again this is a brilliant idea and it is so nice of you to make a software that makes the same process for others easy, thanks sir for now i could easily convert my application from .py to .exe without any coding!!.

    • PyTutorials
      PyTutorials  23 days ago +1

      I'm glad you found this tool useful!

  • Rhys Taylor
    Rhys Taylor 24 days ago

    So will this work if you have a file responding to say managers for other code? It seems to fail for me each time

    • PyTutorials
      PyTutorials  24 days ago

      "managers for other code"? What you you mean by this?

  • Vincenzo Sammartano
    Vincenzo Sammartano 25 days ago

    Hi! I have shared your video, because I have found it really useful! cheers

    • PyTutorials
      PyTutorials  25 days ago

      Thank you! I'm glad you found it really useful!

  • vinay singh
    vinay singh 25 days ago +3

    hey i am getting warning lib not found: api-ms-win-crt dependency something plz help

    • vinay singh
      vinay singh 14 days ago

      +Vanshu Galhotra thank you so much let me try this

    • Vanshu Galhotra
      Vanshu Galhotra 20 days ago +1

      Ok create a new folder and then copy the all files of that zip file in the folder and then open the folder and press shift and right click to open command window there then write that sir said

    • vinay singh
      vinay singh 22 days ago

      +PyTutorials let me try this!!!!!!!!!!!
      THANK YOU SO MUCH!!!!!!!!!!!

    • PyTutorials
      PyTutorials  22 days ago +1

      I recommend you follow the debugging instructions outlined at nitratine.net/blog/post/issues-when-using-auto-py-to-exe/#debugging and tell me the exact error is you are unable to fix it with this information (this message will be specific to what has gone wrong in your application). Please note that this link appears at the bottom of auto-py-to-exe on each build, so I am going to assume you have read it at least once out of your 1000 times packaging.

    • vinay singh
      vinay singh 22 days ago

      +PyTutorials sir i have tried like 1000 of time but i am getting same errors even i have run this application in 3 different system but i am getting same error what to do now!!!
      actually this is a project of my TYIT i have completed all work i just have to convert it but i am failing to do it.
      i truly appreciate your awesome work
      i truly appreciate your concern about helping attitude towards us
      but i need a small help
      this not like i haven't tried
      i have tried like 1000 time with different diffrent method many of was your video only, but i don't know why i am not able to do
      you know .exe get generate of around 85mb but it does not run due to that warning only
      plz help

  • ahmed Alsersy
    ahmed Alsersy 25 days ago

    Thanks, this is like fast food, easy sweet and fast.
    I just have a question, I have a main python file (GUI) which is linked to 6 other python files(engines), I would like to make the GUI an executable file, but my question is what should I do with the rest? should I convert them too or should I just add them to the folder? If I should add them to the folder, would it be the same folder or another folder within?

    Thanks in advance

    • PyTutorials
      PyTutorials  25 days ago

      Just like if you were using the os module; your scripts and the os module do not have much differences in how they are found.

    • PyTutorials
      PyTutorials  25 days ago

      Good, PyInstaller used in the background will find these recursively.

    • ahmed Alsersy
      ahmed Alsersy 25 days ago

      +PyTutorials it does. it imports a support script and then the support script imports all other scripts

    • PyTutorials
      PyTutorials  25 days ago

      Does you main script not import the others at all? How do they all relate then?

    • ahmed Alsersy
      ahmed Alsersy 25 days ago

      +PyTutorials wow that was really fast... I get that you mean that the main script import other classes(scripts)? is that true?
      I will convert the main script and then add the other scripts in py format and try and see if they work together or not and then reply back
      Thanks

  • Chuan Jie Woo
    Chuan Jie Woo 25 days ago

    Sorry i'm back again with another qn. i have an error of
    Exception:
    Cannot find existing PyQt5 plugin directories
    Paths checked: C:/qt64/qt_1544645195969/_h_env/Library/plugins
    while tryin to convert 1 of the .py to .exe file. I have checked using pip install PyQt5 that i have that installed in my computer. I can't find anything wrong but the file cant be converted

    • Chuan Jie Woo
      Chuan Jie Woo 25 days ago +1

      +PyTutorials Thanks the exclude module helped solved my problem

    • PyTutorials
      PyTutorials  25 days ago

      Then uninstalling PyQt5 should do it. Or you could add PyQt5 to --exclude-module in the advanced tab.

    • Chuan Jie Woo
      Chuan Jie Woo 25 days ago

      +PyTutorials nope my script didnt use PyQt5

    • Chuan Jie Woo
      Chuan Jie Woo 25 days ago

      +PyTutorials nope my script doesnt use PyQt5

    • PyTutorials
      PyTutorials  25 days ago

      Are you using PyQt5 in your script?

  • Arjun Pukale
    Arjun Pukale 25 days ago

    I have a program in which I have used tkinter and pyttsx3 after making the .exe file while running it is throwing error, named pyttsx3.driver not found

    • PyTutorials
      PyTutorials  25 days ago

      Add pyttsx3.driver to --hiden-imports in the advance tab (hover over the question mark beside it for information)

    • Arjun Pukale
      Arjun Pukale 25 days ago

      But the .py file is running properly without any issue

    • Arjun Pukale
      Arjun Pukale 25 days ago

      +PyTutorials module

    • PyTutorials
      PyTutorials  25 days ago

      Is that a module or file that it's missing?

  • DW
    DW 27 days ago +3

    Holy crap thank you so much!

  • Chuan Jie Woo
    Chuan Jie Woo 29 days ago

    i converted my .py to .exe however, the window open and closes even though i put the line input() at the end of my script.

    • PyTutorials
      PyTutorials  19 days ago

      It's ok, you're not the first and definitely not the last. I recommend reading that post, especially where files are placed when it is packed. The driver is most likely where you don't expect it so the post will help you understand where it should be.

    • Chuan Jie Woo
      Chuan Jie Woo 19 days ago

      +PyTutorials So sorry about that because i wasn't reading carefully. But thanks for the patience to help me

    • PyTutorials
      PyTutorials  19 days ago

      Finally, your error is "configparser.NoSectionError: No section: 'ChromeDriver'". Fix that and repackage.

    • Chuan Jie Woo
      Chuan Jie Woo 19 days ago

      +PyTutorials oh i did read but i think i missed out the command prompt part. So sorry about it. The error is "configparser.NoSectionError: No section: 'ChromeDriver'
      [13164] Failed to execute script browser"

    • PyTutorials
      PyTutorials  19 days ago

      Yes, did you read the post I linked to you a week ago? It's outlined clearly in there.

  • Okan Ozdemir
    Okan Ozdemir 29 days ago

    After conversion Can I modify my program? Will I have a program written in python and extended to c ++ since it is exe? You rock! Thanks

    • PyTutorials
      PyTutorials  29 days ago

      Executables are binaries, you could modify them technically but it won't be easy; you might as well re-package. You can still modify the original script and re-package.

  • Vinayak Kunder
    Vinayak Kunder 29 days ago

    Hi, its giving me error :
    Error: Eel not found
    Please install PyInstaller using: "python -m pip install Eel
    The requirement is already satisfied, then too. Please help

    • PyTutorials
      PyTutorials  29 days ago

      If you look in the description (or even the git repo), I mention it is easier/faster to use `pip install auto-py-to-exe` and then simply execute auto-py-to-exe in cmd to open the tool.

    • Vinayak Kunder
      Vinayak Kunder 29 days ago

      Yes, i have installed 2.7 too but that's not in anaconda, anaconda prompt has only 3.6 version that's why i executed it on anaconda prompt. May be if that's the problem, will uninstall 2.7 and try to execute again

    • PyTutorials
      PyTutorials  29 days ago

      Do you have multiple versions of Python installed? I see this error appear when people get confused between multiple distributions. The pip command might be using one version of python but when you execute it, it may be using a different version. That comment did not settle my theory at all

    • Vinayak Kunder
      Vinayak Kunder 29 days ago

      pip version is 3.6 and i am using anaconda prompt because dependencies are installed in it+PyTutorials

    • PyTutorials
      PyTutorials  29 days ago

      Are you sure the version of pip you are using to install Eel uses the same Python executable (version and environment) you are using to run auto-py-to-exe?

  • gethsitha sthuthine

    Command python setup.py egg_info failed with error code 1 in C:\Users\King\AppData\Local\Temp\pip_build_King\gevent
    Storing debug log for failure in C:\Users\King\pip\pip.log "Im getting this error please suggest me on what to do in order to clear this error"

    • gethsitha sthuthine
      gethsitha sthuthine Month ago +1

      +PyTutorials thanks for yr fast reply, it's really inspiring..!!

    • PyTutorials
      PyTutorials  Month ago +1

      Try upgrading setuptools - it may be your envrionment. Do this by using `pip install --upgrade setuptools`

  • Last First
    Last First Month ago +1

    If i convert said .py to .exe and run it on a pc without python installed will it run?

    • Last First
      Last First Month ago +1

      +PyTutorials oh nice

    • PyTutorials
      PyTutorials  Month ago +1

      Yes, that is the whole point of converting it to an executable.

  • koksem1234
    koksem1234 Month ago

    61 INFO: PyInstaller: 3.4
    62 INFO: Python: 3.7.2
    62 INFO: Platform: Windows-10-10.0.17763-SP0
    64 INFO: wrote C:\Users\koksem1234\Desktop\untit\main.spec
    65 INFO: UPX is not available.
    66 INFO: Extending PYTHONPATH with paths
    ['C:\\Users\\koksem1234\\Desktop\\untit',
    'C:\\Users\\koksem1234\\Desktop\\untit']
    66 INFO: checking Analysis
    81 INFO: checking PYZ
    91 INFO: checking PKG
    91 INFO: Building PKG because PKG-00.toc is non existent
    92 INFO: Building PKG (CArchive) PKG-00.pkg
    Traceback (most recent call last):
    File "C:\Users\koksem1234\PycharmProjects\untitled\Scripts\pyinstaller-script.py", line 11, in
    load_entry_point('PyInstaller==3.4', 'console_scripts', 'pyinstaller')()
    File "C:\Users\koksem1234\PycharmProjects\untitled\lib\site-packages\PyInstaller\__main__.py", line 111, in run
    run_build(pyi_config, spec_file, **vars(args))
    File "C:\Users\koksem1234\PycharmProjects\untitled\lib\site-packages\PyInstaller\__main__.py", line 63, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
    File "C:\Users\koksem1234\PycharmProjects\untitled\lib\site-packages\PyInstaller\building\build_main.py", line 838, in main
    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
    File "C:\Users\koksem1234\PycharmProjects\untitled\lib\site-packages\PyInstaller\building\build_main.py", line 784, in build
    exec(text, spec_namespace)
    File "", line 29, in
    File "C:\Users\koksem1234\PycharmProjects\untitled\lib\site-packages\PyInstaller\building\api.py", line 424, in __init__
    strip_binaries=self.strip, upx_binaries=self.upx,
    File "C:\Users\koksem1234\PycharmProjects\untitled\lib\site-packages\PyInstaller\building\api.py", line 196, in __init__
    self.__postinit__()
    File "C:\Users\koksem1234\PycharmProjects\untitled\lib\site-packages\PyInstaller\building\datastruct.py", line 158, in __postinit__
    self.assemble()
    File "C:\Users\koksem1234\PycharmProjects\untitled\lib\site-packages\PyInstaller\building\api.py", line 273, in assemble
    pylib_name = os.path.basename(bindepend.get_python_library_path())
    File "C:\Users\koksem1234\AppData\Local\Programs\Python\Python37-32\lib\ntpath.py", line 214, in basename
    return split(p)[1]
    File "C:\Users\koksem1234\AppData\Local\Programs\Python\Python37-32\lib\ntpath.py", line 183, in split
    p = os.fspath(p)
    TypeError: expected str, bytes or os.PathLike object, not NoneType

    • PyTutorials
      PyTutorials  Month ago

      I don't believe this output has come from auto-py-to-exe as it is missing a lot of things. Please provide the correct output otherwise I cannot help.

  • Michael Donini
    Michael Donini Month ago +1

    You saved me thx a lot

  • s 1291
    s 1291 Month ago

    When Microsoft releases its new chromium based Edge Browser does the user have Chrome installed? I expect the script to work natively (without google chrome installed)

    • PyTutorials
      PyTutorials  Month ago

      Give it a try and you will notice that it does still work. You will be promoted to select a browser if a default is not set which is then used.

  • Sahaj Oberoi
    Sahaj Oberoi Month ago

    Hi there, through your project, I've been able to create .exe file of my project but unfortuantely the .exe file of my project isn't running as it was running as .py
    .py file was running perfectly fine but .exe automatically closes once I press a button on it. My project is made using PyQt5. Pls help? I can provide the source code if needed

    • PyTutorials
      PyTutorials  Month ago

      When a package is built, a link appears at the bottom of the UI. Did you read any of this? If you did read this (I generally assume people have as it appears right in front of you), what is the error? I cannot help without an error sorry.

  • Pedro Miotti
    Pedro Miotti Month ago +1

    You are a awesome !!!!

  • Aleksander Heggedal

    These tutorials are incredibly good! Most RU-clip tutorials take 1-10 minutes to actually get to the point. Thank you for all the work you put into this!! 10/10

  • ChrispyToast
    ChrispyToast Month ago

    i try to get a window with an image with tkinter
    pastebin.com/vrH7F6Mh that is my code and that are the settings in the app: drive.google.com/open?id=1Bd2EhLpGB7_7X3fmFt4lkWGcFADYqom6

    i am not sure what i have to change so that the image is displayed
    btw. awesome videos

    • PyTutorials
      PyTutorials  Month ago

      Change the file reference to a relative reference. I recommend putting the file right beside the executable when testing and packaging so you can assume the file will always be beside it (if you are having trouble with references)

    • ChrispyToast
      ChrispyToast Month ago

      +PyTutorials yeah, OK i unterstand you are right, i want to use a relativ to pack it in the executable.
      But what should i change to make it Work?

    • PyTutorials
      PyTutorials  Month ago

      You are packaging the file into the executable package, yet you are referencing the file outside using an absolute reference. I believe you will want to be using a relative reference so you can move the executable?

    • ChrispyToast
      ChrispyToast Month ago

      +PyTutorials that is the image that should be displayed, which works only as .py

    • PyTutorials
      PyTutorials  Month ago

      In your script you are referencing your file as `H:\\Users\\Users\\Desktop\\picture.png`; do you not want to pack it in with the executable?

  • AgentMoe
    AgentMoe Month ago

    great content, thanks
    btw : can you tell where you found that desktop image? :)
    it looks fantastic, i would like to set it as my desktop picture as well

    • PyTutorials
      PyTutorials  Month ago

      Thank you! I provide all my backgrounds at: nitratine.net/blog/post/my-desktop-backgrounds/

  • Pixel_
    Pixel_ Month ago

    where did you develop this? Python? Please tutorial

    • Pixel_
      Pixel_ Month ago +1

      +PyTutorials ok thanks really much

    • PyTutorials
      PyTutorials  Month ago

      I developed this in Python, the source is all in the GitHub repo. I used Eel for the front end which I did a video on at ru-clip.net/video/2kbeBzEQfXE/video.html

  • The Albatross
    The Albatross Month ago

    I. Love. You

  • Cici Kuş
    Cici Kuş Month ago

    Hey, hello. I have tried py2exe, cx_Freeze and pyinstaller they did not work for me. but also your app did not work too. it was okay till i get the .exe file. when i click and open it, it says "fatal error running script" (or something like that) when i try to convert it into an .exe file with these options: one file, windows based(hide the console). but also i have tried directory style and with console but this time it says "the app has stopped working" ,shortly; i made every combination and it always gives an error how can i handle this? please help me. i really want to get an .exe file perfectly. (btw i chose the additional file option. i added an image.png file directory) maybe the problem is about the png file but i just wanted to ask you anyway. please help me, thanks!

    • PyTutorials
      PyTutorials  Month ago

      In the description I try to make the help post I wrote myself very clear. I HIGHLY recommend you read it ( nitratine.net/blog/post/issues-when-using-auto-py-to-exe/ ) and follow debugging methods.
      I cannot help if you simply tell me you got "fatal error running script"; I need to know the actual error otherwise I cannot help - debugging will find this error.

  • Frezi2005
    Frezi2005 Month ago

    i got fucking Trojan do not use this

    • PyTutorials
      PyTutorials  Month ago

      I'm sorry, what? This is not a Trojan, I literally released the source code....

  • PaulaTejano
    PaulaTejano Month ago

    disgraça não funciona
    edit: funcionou,, ta agora vai da certo,,
    thank you

    • PaulaTejano
      PaulaTejano Month ago +1

      +PyTutorials It worked, sorry, thanks.

    • PyTutorials
      PyTutorials  Month ago

      Are you installing it using pip? I definitely recommend using pip to install now. Very simple instructions can be found at: github.com/brentvollebregt/auto-py-to-exe

    • PaulaTejano
      PaulaTejano Month ago

      1:30 ,,, not open it, opens pycharm ,, and python ,,, then i run by pycharm anyway so it does not open that window,,, uso python 3.7.1 progran in pycharm

    • PaulaTejano
      PaulaTejano Month ago

      +PyTutorials auto-py-to-exe

    • PyTutorials
      PyTutorials  Month ago

      What window isn't opening? auto-py-to-exe or your program after packaging?

  • Bernardo Cambruzzi
    Bernardo Cambruzzi Month ago +1

    I am in love with your solution, hope it works...

    • PyTutorials
      PyTutorials  Month ago

      Interesting... You may have been missing some packages. What was the error?

    • Bernardo Cambruzzi
      Bernardo Cambruzzi Month ago

      +PyTutorials, So... I had a little problem. It did not work with python 3.7 for me. Then I created another enviroment on anaconda, with python 3.5. Installed your solution in that env and ran it. Then it worked.

    • PyTutorials
      PyTutorials  Month ago

      Thank you! If you have any issues, try looking at nitratine.net/blog/post/issues-when-using-auto-py-to-exe/ as it gives help in great depth.

  • Alex Sadovnikov
    Alex Sadovnikov Month ago

    i can not see my converted file! :(

    • Alex Sadovnikov
      Alex Sadovnikov Month ago

      i fixed

    • PyTutorials
      PyTutorials  Month ago

      If you can't see it then something must be going wrong. Without any errors or specific descriptions of where things are going wrong, I cannot help sorry.

    • Alex Sadovnikov
      Alex Sadovnikov Month ago

      no

    • PyTutorials
      PyTutorials  Month ago

      Are there any errors you are ignoring? Generally these files don't appear if an error occurred, which should be output.

    • Alex Sadovnikov
      Alex Sadovnikov Month ago

      im on python 3.7.2

  • Panayiotis Cleanthous

    How did you create the gui, and is there any equivalent tool for creating a .py to .app for macos?

    • PyTutorials
      PyTutorials  Month ago

      Oh right, try using this tool on mac. PyInstaller supports to .app when building on MacOS. I cannot guarantee this tool will work though; it will install but I haven't been able to fully test it as it is not easy to get the OS to test with.

    • Panayiotis Cleanthous
      Panayiotis Cleanthous Month ago

      +PyTutorials I am asking if there is an equialent tool that i can put the .py file and take a .app instead of a .exe in ordee for me to run it on macos instead of windows.

    • PyTutorials
      PyTutorials  Month ago

      I used Eel to create the GUI, this is stated on the GitHub repo's README.In terms of you asking about "macos"? macos in what? Excel, ones made in Python, something in a different application?

  • Nathan ThreeLeaf
    Nathan ThreeLeaf Month ago

    Do you have any experience using your pyinstaller tool with folium? I've run into an issue that seems to be related to the folium package, where it can't find a file. Just curious if you've encountered any issues before and possible have a solution. Thanks for your time.

    • PyTutorials
      PyTutorials  Month ago +1

      +Nathan ThreeLeaf If you add it in additional files (use the add files button), put a `.` (dot) in the destination; this will put it in the root of the project. Packaging to onefile can help verify that the file is put in the structure as you can look in the folder manually.

    • Nathan ThreeLeaf
      Nathan ThreeLeaf Month ago

      +PyTutorials So I'm working through a resolution with folium and its dependencies that are causing the issues; hopefully some progress there soon. In the meantime, I do have another question which is a new challenge to me and that is adding chromedriver.exe to the auto-py-to-exe binaries. I'm a little unclear as to how the format should be structured in that field. I've tried a few different formats, such as: 'C:/ChromeDriver/chromedriver.exe' and then I tried 'C:\\ChromeDriver\\chromedriver','.' based on a post I saw in my searches, but both were unsuccessful. Could you possibly offer some direction here?

    • PyTutorials
      PyTutorials  Month ago

      +Nathan ThreeLeaf Don't be sorry! It was good to help you find what is causing the issue. You have definitely been very co-operative which I don't usually get; thank you.

    • Nathan ThreeLeaf
      Nathan ThreeLeaf Month ago

      +PyTutorials I gave this a shot and wrote a simple tkinter ui that uses folium. When using your pyinstaller program, it compiles fine but crashes when running it with the missing _cnames.json error. If I comment out 'import folium' it compiles and runs fine, so I feel I can be pretty certain its folium. Sorry to bother you with this, it seems at this point it's on the folium developers to work out a fix. I appreciate your suggestions and help.

    • PyTutorials
      PyTutorials  Month ago

      +Nathan ThreeLeaf A way to test if it is folium is to make a basic script that just uses some of folium's functions. Package that and see if anything is wrong with it.

  • Witox
    Witox 2 months ago

    I have the message, failed to execute script, What could i do? By the way, U're amazing!

    • PyTutorials
      PyTutorials  2 months ago

      Definitely possible

    • Witox
      Witox 2 months ago

      +PyTutorials yes :/

    • Witox
      Witox 2 months ago

      +PyTutorials In fact I'm actually developping a password generator with tkinter so it's a window app. Does she can work in .exe? or it's impossible? thank you!

    • PyTutorials
      PyTutorials  2 months ago

      Oh did it not appear?

    • Witox
      Witox 2 months ago

      +PyTutorials Oh thanks i haven't seen ;)

  • CustomClass5
    CustomClass5 2 months ago

    my script crashes as it imports random. I can't get it to import anything without crashing D; help

    • PyTutorials
      PyTutorials  2 months ago

      Are you 100% sure it is crashing when trying to import random? This is part of the standard library so PyInstaller will have no trouble finding it and its dependencies. What exactly is your error?

  • Sebastian Blue
    Sebastian Blue 2 months ago

    Hi!
    I'm not sure where I went wrong. The conversion seemed to have worked, but there were a lot of warnings in the output. Nevertheless it put out a file, but when I try to run it, it says "Fatal error detected - Failed to execute script myscript". And all thats left is click OK and the window closes.
    It's a pygame file and I have some images in my script. I also included those in the conversion.
    I saw your referral to another guy's comment about a pygame file, but I'm not sure what to make of this stackoverflow thread...
    Any help is appreciated!

    Thank you good Sir!

    • PyTutorials
      PyTutorials  2 months ago

      If you look in the description, you will find a help post which describes how to debug these packages really well: nitratine.net/blog/post/issues-when-using-auto-py-to-exe/#debugging . This should tell you what the error is. If you cannot fix the error for some reason, comment it here and I can take a look.

  • useless VEVO
    useless VEVO 2 months ago +1

    Love you!

  • Tech Lounge
    Tech Lounge 2 months ago

    I so happy you made this, but I'm experiencing a issue, and I would really appreciate it if you can help me. Here is what I do: search for the .py file, select "One File", select "Window Based (hide the console)", then I add 4 additional files that are used in my code (2 images, 2 audio files). After that, I click "CONVERT .PY TO .EXE". It says "completed successfully", although when I open the .exe in the output folder, it says "Failed to execute script A_bit_Racey". I'm new at coding, so I'm sure i'm not thinking of something, but it would be great if you can tell me what the issue here is. Thanks!

    • PyTutorials
      PyTutorials  2 months ago

      I recommend you read the resources that I provide in the description. Especially the one at nitratine.net/blog/post/issues-when-using-auto-py-to-exe/

  • ΛRPΛN ©
    ΛRPΛN © 2 months ago

    What's the use case for "One Directory"? Is it meant for shipping the software package to a user/customer who doesn't have the required libraries, etc.?

    • PyTutorials
      PyTutorials  2 months ago

      I would recommend using one directory for everything but people seem to like everything in a single executable which is slower to start and a lot harder to debug. On directory simply doesn't pack all the files into one executable so there is no need to unpack on every run.

  • Ankit Saini
    Ankit Saini 2 months ago +1

    you're amazing bro.

  • Manzar Alam
    Manzar Alam 2 months ago

    I used the tool provided by you and tried to build the exe file. After converting to the exe file i tried to open it. it shows me the error "failed to execute the demo.exe"
    In that project, I have build a GUI using Tkinter.

    • PyTutorials
      PyTutorials  2 months ago

      Have you read over the blog post linked in the description? nitratine.net/blog/post/issues-when-using-auto-py-to-exe/

  • anyways
    anyways 2 months ago

    it gives me the exe (one file) but whene cliking on it , it gives me a boxe message saying : failed to execute script main.py

    • PyTutorials
      PyTutorials  2 months ago

      Have you read over the blog post linked in the description? nitratine.net/blog/post/issues-when-using-auto-py-to-exe/

  • A. Chadi
    A. Chadi 2 months ago

    Hello ! How can i exclude many modules in the advanced tab -- exclude --
    For example, is it : PyQt5, PyQt4, scipy or with space in between : PyQt5 PyQt4 scipy ?

    • PyTutorials
      PyTutorials  2 months ago

      If you hover over the question mark beside it, you will find that it is later split by commas. (You can make it a comma and a space if you want)

  • Luis Angel Pacheco Romero

    Hello. I have a problem when i try convert it . the error is "AttributeError: 'str' object has no attribute 'items'"
    can you help me, please. Thanks you so much

    • PyTutorials
      PyTutorials  2 months ago

      Could you give some more content on this like where it occurred and more of the error please.

  • Victor Mendonça Nogueira

    exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 20, in
    from PyInstaller import __version__ as version, HOMEPATH, PLATFORM
    ModuleNotFoundError: No module named 'PyInstaller'

    ----------------------------------------
    Command "c:\users\vmnogueira\appdata\local\programs\python\python37-32\python.exe c:\users\vmnogueira\appdata\local\programs\python\python37-32\lib\site-packages\pip\_vendor\pep517\_in_process.py get_requires_for_build_wheel C:\Users\VMNOGU~1\AppData\Local\Temp\tmp_2web156" failed with error code 1 in C:\Users\VMNOGU~1\AppData\Local\Temp\pip-install-kvw7lugk\PyInstaller

    • PyTutorials
      PyTutorials  2 months ago

      Are you using pip 19.0? I recommend you read this: github.com/pyinstaller/pyinstaller/issues/4003

  • Viji Vijay
    Viji Vijay 2 months ago

    i am using py2exe , it's showing tuple index out of range , i have python program which is having so many modules called in it, like importing the other programs into single program .please do give the solution to this...
    ty

    • PyTutorials
      PyTutorials  2 months ago

      You will need to provide the full error for me to help sorry, I can't see the origin at all in the photo. Use pastebin to show me your error.

    • Viji Vijay
      Viji Vijay 2 months ago

      +PyTutorials this is the error in the link , all the py files which I want to convert to exe file has no errors the errors are in the packages
      drive.google.com/file/d/1QAsOfpN8b6sgENIOpDpN4C6a1_g3WVl-/view?usp=drivesdk
      Please do seee

    • PyTutorials
      PyTutorials  2 months ago

      If you would like help I will need to see the actual error. If you are using py2exe though I might not be able to offer much help, but I will still try.

  • cmacompilation
    cmacompilation 2 months ago

    Hello sir ! Does it work with machine learning libraries (scikit learn, keras, openCV..) ?? Because i tried with pyinstaller a year ago and it didn't .. thank for your effort and time .

    • PyTutorials
      PyTutorials  2 months ago

      There is a possibility but you may need to setup hooks and manually add some files to the correct location.

  • Mykle
    Mykle 2 months ago +1

    man it gives me an error when i'm trying to convert a python file importing pygame ! i can't convert my games because of this error! I'm using Python 3.6

    • Mykle
      Mykle 2 months ago +1

      +PyTutorials your tools is super useful for me ( i was tired about using cx_freeze.....)

    • Mykle
      Mykle 2 months ago +1

      +PyTutorials perfect it works now thank you

    • PyTutorials
      PyTutorials  2 months ago

      Try this: stackoverflow.com/questions/47692960/error-when-using-pyinstaller-unicodedecodeerror-utf-8-codec-cant-decode-byt

    • Mykle
      Mykle 2 months ago

      the error is :

      ----------------------------------------
      'utf-8' codec can't decode byte 0xff in position 174: invalid start byte
      These are the bytes around the offending byte:
      ----------------------------------------
      An error occurred, traceback follows:
      Traceback (most recent call last):
      File "c:\users\arkunit\appdata\local\programs\python\python36\lib\site-packages\auto_py_to_exe\__main__.py", line 215, in convert
      pyi.run() # Execute PyInstaller
      File "c:\users\arkunit\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\__main__.py", line 111, in run
      run_build(pyi_config, spec_file, **vars(args))
      File "c:\users\arkunit\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\__main__.py", line 63, in run_build
      PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
      File "c:\users\arkunit\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\building\build_main.py", line 838, in main
      build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
      File "c:\users\arkunit\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\building\build_main.py", line 784, in build
      exec(text, spec_namespace)
      File "", line 17, in
      File "c:\users\arkunit\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\building\build_main.py", line 241, in __init__
      self.__postinit__()
      File "c:\users\arkunit\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\building\datastruct.py", line 158, in __postinit__
      self.assemble()
      File "c:\users\arkunit\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\building\build_main.py", line 500, in assemble
      module_hook.post_graph()
      File "c:\users\arkunit\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\building\imphook.py", line 410, in post_graph
      self._load_hook_module()
      File "c:\users\arkunit\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\building\imphook.py", line 377, in _load_hook_module
      self.hook_module_name, self.hook_filename)
      File "c:\users\arkunit\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\compat.py", line 736, in importlib_load_source
      return mod_loader.load_module()
      File "", line 399, in _check_name_wrapper
      File "", line 823, in load_module
      File "", line 682, in load_module
      File "", line 251, in _load_module_shim
      File "", line 675, in _load
      File "", line 655, in _load_unlocked
      File "", line 678, in exec_module
      File "", line 205, in _call_with_frames_removed
      File "c:\users\arkunit\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\hooks\hook-zmq.py", line 18, in
      hiddenimports = ['zmq.utils.garbage'] + collect_submodules('zmq.backend')
      File "c:\users\arkunit\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\utils\hooks\__init__.py", line 626, in collect_submodules
      repr(pkg_dir), package))
      File "c:\users\arkunit\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\utils\hooks\__init__.py", line 85, in exec_statement
      return __exec_python_cmd(cmd)
      File "c:\users\arkunit\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\utils\hooks\__init__.py", line 72, in __exec_python_cmd
      txt = exec_python(*cmd, env=pp_env)
      File "c:\users\arkunit\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\compat.py", line 580, in exec_python
      return exec_command(*cmdargs, **kwargs)
      File "c:\users\arkunit\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\compat.py", line 370, in exec_command
      out = out.decode(encoding)
      UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 174: invalid start byte

  • Petrockspiracy
    Petrockspiracy 2 months ago

    I tried this a while ago and just tried it again, just gives me the same error
    AttributeError: '_NotSet' object has no attribute 'lower'

    I have no idea what this means in the context it's given

    • PyTutorials
      PyTutorials  2 months ago

      Could you give me a small snippet of code to reproduce this

  • xonic xonic
    xonic xonic 2 months ago

    It says it cannot find directory video(1:09)

    • xonic xonic
      xonic xonic 2 months ago +1

      +PyTutorials Sorry forgot to reply ;) , it's alright now, thanks !

    • PyTutorials
      PyTutorials  2 months ago

      When installing the requirements using pip?

  • A. Chadi
    A. Chadi 2 months ago

    this is the error i get : i'm using python3.6, tkinter, sqlite3, numpy, scipy, matplotlib, soundfile
    please, what's wrong
    File "", line 399, in _check_name_wrapper
    File "", line 823, in load_module
    File "", line 682, in load_module
    File "", line 265, in _load_module_shim
    File "", line 684, in _load
    File "", line 665, in _load_unlocked
    File "", line 678, in exec_module
    File "", line 219, in _call_with_frames_removed
    File "c:\program files\python36\lib\site-packages\PyInstaller\hooks\hook-PyQt5.py", line 23, in
    collect_system_data_files(pyqt5_library_info.location['PrefixPath'],
    File "c:\program files\python36\lib\site-packages\PyInstaller\utils\hooks\qt.py", line 67, in __getattr__
    qli = json.loads(json_str)
    File "c:\program files\python36\lib\json\__init__.py", line 354, in loads
    return _default_decoder.decode(s)
    File "c:\program files\python36\lib\json\decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File "c:\program files\python36\lib\json\decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
    json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

    Project output will not be moved to output folder
    Complete.

    • A. Chadi
      A. Chadi 2 months ago +1

      Thank you a lot for your generosity sir, that was so informative and helpful to me , thanx again

    • PyTutorials
      PyTutorials  2 months ago

      This is a bit of a tough one to explain; in this case it was easy to see as you didn't use PyQt in your project. When packaging to one directory (I generally recommend doing this first to work everything out before moving to one file), you can look in the files in the package and at times you can see modules that you don't used added to the package. Be aware though, some of these are required by pyinstaller, it is a bit of trial and error until you get used to it.

    • A. Chadi
      A. Chadi 2 months ago

      +PyTutorials Thank you very much GOD BLESS you sir, it worked , can i ask : how could i know wich modules to exclude (or how did you know it from reading the error msgs)

    • A. Chadi
      A. Chadi 2 months ago

      +PyTutorials thank you sir, i will try and let you know weather it's working or not

    • PyTutorials
      PyTutorials  2 months ago

      PyQt5 is trying to be added. You can stop it from being added by setting '--exclude-module' in the advanced tab to `PyQt5` (and anything else if you need them removed also)

  • A. Chadi
    A. Chadi 2 months ago

    this is the error i get : i'm using python3.6, tkinter, sqlite3, numpy, scipy, matplotlib, soundfile
    please, what's wrong
    File "", line 399, in _check_name_wrapper
    File "", line 823, in load_module
    File "", line 682, in load_module
    File "", line 265, in _load_module_shim
    File "", line 684, in _load
    File "", line 665, in _load_unlocked
    File "", line 678, in exec_module
    File "", line 219, in _call_with_frames_removed
    File "c:\program files\python36\lib\site-packages\PyInstaller\hooks\hook-PyQt5.py", line 23, in
    collect_system_data_files(pyqt5_library_info.location['PrefixPath'],
    File "c:\program files\python36\lib\site-packages\PyInstaller\utils\hooks\qt.py", line 67, in __getattr__
    qli = json.loads(json_str)
    File "c:\program files\python36\lib\json\__init__.py", line 354, in loads
    return _default_decoder.decode(s)
    File "c:\program files\python36\lib\json\decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File "c:\program files\python36\lib\json\decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
    json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

    Project output will not be moved to output folder
    Complete.

    • PyTutorials
      PyTutorials  2 months ago

      This issue can be seen in github.com/pyinstaller/pyinstaller/issues/3997

    • PyTutorials
      PyTutorials  2 months ago

      PyQt5 is trying to be added. You can stop it from being added by setting '--exclude-module' in the advanced tab to `PyQt5` (and anything else if you need them removed also)

  • Slimey Tutorials
    Slimey Tutorials 2 months ago

    Hi! Sorry for the bother I am trying to convert a few files I have but it simply would not work, it just opens and immediately crashes, I would be very grateful if you can help me solve this issue

    • PyTutorials
      PyTutorials  2 months ago

      auto-py-to-exe supports Python 2.7-3.7 (above hasn't been investigated yet).
      Still, you found a solution which is good!

    • Slimey Tutorials
      Slimey Tutorials 2 months ago

      +PyTutorials Ya I had a look, dug through a little bit and I think the only reason it didn't work may be because the software does not support python 3.6, I'm not sure, but either way I used cx-freeze and it worked very well, thanks for your quick reply anyway :)

    • PyTutorials
      PyTutorials  2 months ago

      Did you read the post linked in the description? It has been written to help people debug their packages faster and understand what is going on.
      nitratine.net/blog/post/issues-when-using-auto-py-to-exe/

  • Origameasy
    Origameasy 2 months ago

    When I do "pip install -r requirements.txt", I have " ModuleNotFoundError: No module named 'PyInstaller' " HELP ME PLEASE !!!

    • Origameasy
      Origameasy 2 months ago +1

      +PyTutorials Thanks, I finally managed to install cx_Freeze manually so I will try to convert my project manually.

    • PyTutorials
      PyTutorials  2 months ago

      Try using something in the 18's (as outlined in the issue)

    • Origameasy
      Origameasy 2 months ago

      +PyTutorialsI use the version (19.0.1)

    • PyTutorials
      PyTutorials  2 months ago

      I recommend reading github.com/pyinstaller/pyinstaller/issues/4003

    • PyTutorials
      PyTutorials  2 months ago

      What version of pip are you using?

  • Kill_Fighter
    Kill_Fighter 2 months ago +1

    when i open the .exe file it opens an other black window and then the python that i converted...

    • Kill_Fighter
      Kill_Fighter 2 months ago +2

      +PyTutorials ohh yeah :D now i see thanks

    • PyTutorials
      PyTutorials  2 months ago +1

      Did you select "Window based" for the console window option?

    • Kill_Fighter
      Kill_Fighter 2 months ago

      +PyTutorials to open the program i executed only without the black window...

    • PyTutorials
      PyTutorials  2 months ago +1

      What were you expecting?

  • Isley
    Isley 2 months ago

    It does't work for me, I also tried following your video using the manual way but I can't even install pyinstaller. I errors but I have python 3.7.2 installed and I added python to path during installation. I tried doing the same inside pycharm terminal and I was able to install and your program opened but when I try to make the executable I get several lines saying "WARNING: lib not found:" and at the end I get this "TypeError: expected str, bytes or os.PathLike object, not NoneType

    Project output will not be moved to output folder
    Complete.
    "

    How can I solve it? The script itself runs ok in pycharm.

    • PyTutorials
      PyTutorials  2 months ago

      Those are just warnings that you can ignore. I'm guessing you didn't read the description? There is a VERY helpful blog post at nitratine.net/blog/post/issues-when-using-auto-py-to-exe/ which can help you debug your application and covers a lot you need to know when packaging your script.

  • MUHAMMAD RASHID
    MUHAMMAD RASHID 2 months ago +1

    Nice work, hats off, it also worked on pygame, thanks alot. You saved my day :). Keep it up!

    • PyTutorials
      PyTutorials  2 months ago

      I recommend putting some time in and reading nitratine.net/blog/post/issues-when-using-auto-py-to-exe/ , it will be a lot of help.

    • Mykle
      Mykle 2 months ago

      +MUHAMMAD RASHID ok i will try, thank you for your help

    • MUHAMMAD RASHID
      MUHAMMAD RASHID 2 months ago

      +Mykle try to include images individually, like selecting them one by one then try. That worked for me. IDK why it's not working for you. Or is it giving an error or not running after being converted? If yes, better state the error, so the problem can be solved easily.

    • Mykle
      Mykle 2 months ago

      +MUHAMMAD RASHID ok but how i can include my images... (i tried to include the folder, each images...)

    • MUHAMMAD RASHID
      MUHAMMAD RASHID 2 months ago

      +Mykle pygame is not additional file, u need to include images and stuff which u used or imported in pygame.

  • Rodney Vilkovic
    Rodney Vilkovic 2 months ago

    After the processing finishes, it says "project output will not be moved to output folder" and I can't find it in my designated output folder. What's wrong?

    • PyTutorials
      PyTutorials  2 months ago

      It tells you "project output will not be moved to output folder", why would you expect it to be in the output folder then?
      Also there would have been errors before this that said what went wrong.

  • Taylor Gerrish
    Taylor Gerrish 2 months ago

    "pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available."

    • Taylor Gerrish
      Taylor Gerrish 2 months ago +1

      +PyTutorials Thanks for much for the speedy reply, you earned a sub:) i'll try reinstalling

    • PyTutorials
      PyTutorials  2 months ago

      Interesting. 3.7.2? Are you using a virtualenv? If so, that might have some issues with it. If not, then it may be a reinstall of Python.

    • Taylor Gerrish
      Taylor Gerrish 2 months ago

      +PyTutorials using Windows 10! I have the latest version of python so I assume that is why it won't work

    • PyTutorials
      PyTutorials  2 months ago

      A version of Linux? If so, I literally copied your comment and searched it in Google. Second result was stackoverflow.com/questions/41328451/ssl-module-in-python-is-not-available-when-installing-package-with-pip3/45417908 (1st result was a basic version of this)

    • PyTutorials
      PyTutorials  2 months ago

      What OS are you using?

  • Pradeep Achar
    Pradeep Achar 2 months ago

    Hi
    I am getting a issue when i run the command "pip install -r requirements.txt" , the error it gives is "no module named pyinstaller" can you please guide me.
    python version i am using is 3.6.5 and pip version is 19.0.1.
    Looking forward for your replay.
    Thank you

    • Pradeep Achar
      Pradeep Achar 2 months ago +1

      +PyTutorials Thank you it helped me and it worked
      Thank you so much :)

    • PyTutorials
      PyTutorials  2 months ago

      Might be an bug with pip. A very simple Google search using the error you gave me in quotes lead me to stackoverflow.com/questions/44740792/pyinstaller-no-module-named-pyinstaller . I recommend you read it.

  • Sarmad Akram
    Sarmad Akram 2 months ago

    Amazing =]. Would you like to share how you are getting the filepath. Thanks.

    • Sarmad Akram
      Sarmad Akram 2 months ago +1

      +PyTutorials Thanks. After following this guide it worked but the script was always leaving a tkinter window open. By the way i have found the solution from your code. Thanks again.

    • PyTutorials
      PyTutorials  2 months ago +1

      Yes, tkinter. There is a very simple guide at pythonspot.com/tk-file-dialogs/

    • Sarmad Akram
      Sarmad Akram 2 months ago

      Using tkinter right??

  • heavy pump
    heavy pump 2 months ago

    I did it with linux and when i tried to open it with windows a error showed up

    • PyTutorials
      PyTutorials  2 months ago +1

      I have never ran Linux applications on Windows but you can use WineHQ/Wine to run windows applications on Linux

    • heavy pump
      heavy pump 2 months ago

      +PyTutorials ok thank you for your answer i really like that you answer to people , any suggestions for third party tools to use ??

    • PyTutorials
      PyTutorials  2 months ago

      Oh wow, I didn't read your first comment well. You can't simply package on one OS and try to run it on a completely different OS without using third party tools.

    • heavy pump
      heavy pump 2 months ago

      +PyTutorials the error was the version of this document is incombatible with the version of your windows . Check your system info to know if you need x86(32bit) version or 64bits version then contact logiciel editor
      Thats it sorry for my bad inglish i translated this from french
      And i converted it to exe on linux but he dont have the .exe extension in the end when add it on windows and trayed to open the error showed up

    • PyTutorials
      PyTutorials  2 months ago

      What was the error? There are so many things that could have gone wrong.

  • Amine -_-
    Amine -_- 2 months ago

    Plz sir ! I got this error at the end : Cannot find pyqt4 plugin directories

    • PyTutorials
      PyTutorials  2 months ago

      If that is all there is to the error, then it is something you have done. The file you are trying to read with the json module is not a valid JSON file.

    • Amine -_-
      Amine -_- 2 months ago

      +PyTutorials it has to be a third party module..

    • PyTutorials
      PyTutorials  2 months ago

      You're going to need to show more of the error please, I cannot help with just this. In the last error, that is occurring because something (you or something else) is trying to read a JSON file that does not start with {. Is this you or a third party module?

    • Amine -_-
      Amine -_- 2 months ago

      But while trying to solve this.. i uninstalled pyqt4 and reinstalled it again.. now it's another error unlike the previous is showing up.. i should say, my programme imports numpy, scipy, matplotlib, librosa and soundfile !
      The error wich is now showing is :
      File "C :\Program Files\Python36\lib\json\decoder.py", line 357, in raw_decode raise JSONDecoderError ("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
      Project output will not be moved to output folder

    • Amine -_-
      Amine -_- 2 months ago

      Like in this link : github.com/pyinstaller/pyinstaller/issues/2224

  • Etienne Ekpo
    Etienne Ekpo 2 months ago +1

    Great Job

  • Paulo Massarde
    Paulo Massarde 2 months ago +1

    0.0 That was just awesome :)

  • Cyb3r '
    Cyb3r ' 2 months ago +1

    Muito bom

  • Anesh Muthiah
    Anesh Muthiah 2 months ago

    it's showing invalid add_data or binary_value

    • PyTutorials
      PyTutorials  2 months ago

      This video uses auto-py-to-exe, you do not use pyinstaller directly. auto-py-to-exe has a recursion depth limit exceeded fix in the advanced dropdown.

    • Anesh Muthiah
      Anesh Muthiah 2 months ago

      +PyTutorials I installed through pyinstaller. I used .spec file instead of .py bcoz it showed recursion depth limit exceeded. when I clicked the exe file, it's not showing up anything.

    • PyTutorials
      PyTutorials  2 months ago

      Is that all the error is? Could you provide more of the error if there is more.

  • Anesh Muthiah
    Anesh Muthiah 2 months ago

    I have .py files along with some folders. How to include these folders also?

    • PyTutorials
      PyTutorials  2 months ago

      What do the folders have in them? More Python scripts or assets like images or audio files?

  • Bilal Bhatti
    Bilal Bhatti 2 months ago +1

    Thanks...

  • Deltix
    Deltix 2 months ago

    Its working fine without specific icon but when I try to put a custom one it doesn't work anymore (tried both jpeg and png)

    • Deltix
      Deltix 2 months ago +1

      +PyTutorials Yes it is tkinter, ill make my researches, thanks a lot

    • PyTutorials
      PyTutorials  2 months ago

      That is specific to your application. With you saying "the feather", I am assuming you are using tkinter or something that implements tkinter in the background; you need to set the taskbar and window icon in your script.

    • Deltix
      Deltix 2 months ago

      +PyTutorials Ok I really am dumb sorry, just not rly used to this extension.
      Another question I had in mind : is there a way to change the icon of programe when u open it ? Like instead of the feather in the windows bottom bar and the top left corner of the program

    • PyTutorials
      PyTutorials  2 months ago

      Well of course, because they are not .ico files. The UI has ".ico file" as a placeholder for the icon path input field; you are required to provide a valid ico file.

  • Rodolfo Levoto
    Rodolfo Levoto 3 months ago

    When I try to run my exe I get this: ModuleNotFoundError: No module named 'docx' . Can anyone help?

    • PyTutorials
      PyTutorials  3 months ago

      You may need to add missing packages in the --hidden-import field in the advanced tab. I recommend you read the material linked both in this videos description and the link that literally appears in the UI as it covers this...

  • noceunaotempao
    noceunaotempao 3 months ago +1

    gracias

  • Onur ÜNLÜ
    Onur ÜNLÜ 3 months ago

    Hi' I've got a problem. The script working like charm but the problem is my HD breakdown and I couldn't find my source codes, I tried de decompile from exe. I could rescue file which I wrote for extra but I can't convert to my main py files, have you got any information which technique can work for save this file too?

    • Onur ÜNLÜ
      Onur ÜNLÜ 3 months ago +1

      +PyTutorials thank you. I solved the problem with a hacky way already. Cheers

    • PyTutorials
      PyTutorials  3 months ago

      I have not decompiled one of these executables before sorry. There seems to be quite a bit of help online but make sure you match the pyinstaller version (the one you packaged your script with) to the tutorial as some versions don't work with some things.

  • AlreadyDezire
    AlreadyDezire 3 months ago +1

    Does it matter if i am using tkinter in the python script?

    • PyTutorials
      PyTutorials  3 months ago

      In regards to your reply with the image (it was held for review since you used a URL - no panic), you need to make sure you are referencing the image correctly. Check your current working directory if you are using relative references. I recommend to find the location of the current python file/executable (not the current working directory, as you can call the script from a different cwd) and then add the relative path to that to find exactly where the file is. It is a bit of extra effort but it works every time.

    • PyTutorials
      PyTutorials  3 months ago

      If you're referencing the files relatively then it should be working. If you debug properly it will tell you why it is not working.

    • AlreadyDezire
      AlreadyDezire 3 months ago

      +PyTutorials I put them all in Additional Files and it still did not work. I'll have to leave it oof

    • AlreadyDezire
      AlreadyDezire 3 months ago

      +PyTutorials i did

    • PyTutorials
      PyTutorials  3 months ago

      You need to put them in "Additional Files". I really recommend you read that article.

  • Hermes Underdog
    Hermes Underdog 3 months ago

    Hey I stumble into a problem of inability to connect to localhost, when i type in
    python run.py
    at cmd
    How can possibly I fix that?

    • PyTutorials
      PyTutorials  3 months ago

      How did you install auto-py-to-exe? And what version are you running?

    • Hermes Underdog
      Hermes Underdog 3 months ago

      As soon as I ran the script it opened up my browser, displayed the error I've sent and the script ceased by itself with no communicate.

    • PyTutorials
      PyTutorials  3 months ago

      You can see that the script has stopped for some reason. Did you do this or is something else causing it?

    • Hermes Underdog
      Hermes Underdog 3 months ago

      +PyTutorials imgur.com/a/dzrbwev

    • PyTutorials
      PyTutorials  3 months ago

      An "inability to connect to localhost", what do you mean by that? Are there any errors associated?

  • Manvel Manvel
    Manvel Manvel 3 months ago

    So basically its Pyinstaller with a gui..........

    • PyTutorials
      PyTutorials  3 months ago

      Yep, pretty much. It makes using PyInstaller a LOT easier and also does a lot of cleanup on the side for you

  • nicolaj jensen
    nicolaj jensen 3 months ago

    can you make one for free some not have issues

    • PyTutorials
      PyTutorials  3 months ago

      I'm sorry, I don't understand what you are asking. This tool is already free and doesn't have any issues that I know about, apart from people using it incorrectly

  • Y4h L
    Y4h L 3 months ago

    When starting run.py it gives no output and shows no new windows

    • PyTutorials
      PyTutorials  3 months ago

      When executing run.py, does it complete? Or is it waiting for something?

  • NAMIK K.
    NAMIK K. 3 months ago

    I run the steps and got .exe(it is tkinter gui) but just closing in a second.Also while auto-py-to-exe giving some errors, like :21058 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll
    am i doing something wrong? thanks for your help.

    • PyTutorials
      PyTutorials  3 months ago

      Those messages say "WARNING" don't they? Those are not errors, they say they are warnings.
      If the built project is running and closing immediately, you have most likely made an error in the build or in your project. Read nitratine.net/blog/post/issues-when-using-auto-py-to-exe/#debugging for help on debugging your issue(s).

  • Mervyn Hann
    Mervyn Hann 3 months ago +1

    WOW! Excellent job creating and packaging this useful utility. Thx

  • Pineapple Turnovers
    Pineapple Turnovers 3 months ago

    Hi, I am trying to convert a game I made in pygame, which also uses external files and images. It wouldn't load the exe file when complete. Is there a fix?

    • PyTutorials
      PyTutorials  3 months ago

      Did you read the help article linked in the description? => nitratine.net/blog/post/issues-when-using-auto-py-to-exe/

  • Krzysztof K.
    Krzysztof K. 3 months ago

    Great programs