Convert PY to EXE Automatically



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.

? A faster way to install this now is to execute “pip install auto-py-to-exe”

Currently, Python 3.5 – 3.10 is supported.

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,…

Related Posts

27 Comments

  1. I need help, every time I try to run a python file, it always opens and then closes straightaway. I have python installed and all the requirements, it's been happening for about a month now.

  2. ERROR PLEASE HELP

    An error occurred while packaging
    Traceback (most recent call last):
    File "C:UsersashleyDesktopauto-py-to-exe-masterauto_py_to_exepackaging.py", line 131, in package
    run_pyinstaller()
    File "C:UsersashleyAppDataLocalPackagesPythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0LocalCachelocal-packagesPython38site-packagesPyInstaller__main__.py", line 124, in run
    run_build(pyi_config, spec_file, **vars(args))
    File "C:UsersashleyAppDataLocalPackagesPythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0LocalCachelocal-packagesPython38site-packagesPyInstaller__main__.py", line 58, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)

  3. I have Made a file and i converted it but then it says “virus detected” a few seconds later the file is deleted by Windows defender.
    Please help me with this problem!

  4. Every time I try to convert a script Windows Security goes haywire and puts the file into quarantine before deleting it. It detects it as a Trojan. Any idea how to fix this?

  5. i downloaded and i dont even have a output folder please help. this is the error im getting Project output will not be moved to output folder

    Complete. Also when i click open output folder at the bottom nothing happens please help.

  6. File "E:New folderlibdis.py", line 292, in _get_const_info

    argval = const_list[const_index]

    IndexError: tuple index out of range

    Project output will not be moved to output folder

    Complete.
    i am getting this error can someone tell me why and how to solve it

  7. This is what happend to me 🙂

    C:UsersAdministrator>auto-py-to-exe

    346180 ERROR: An error occurred while packaging

    Traceback (most recent call last):

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesauto_py_to_exepackaging.py", line 131, in package

    run_pyinstaller()

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstaller__main__.py", line 124, in run

    run_build(pyi_config, spec_file, **vars(args))

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstaller__main__.py", line 58, in run_build

    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerbuildingbuild_main.py", line 782, in main

    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerbuildingbuild_main.py", line 714, in build

    exec(code, spec_namespace)

    File "C:UsersADMINI~1AppDataLocalTemptmpmkb2gt8kwusha.py.spec", line 7, in <module>

    a = Analysis(['C:/ooexe/wusha.py'],

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerbuildingbuild_main.py", line 277, in _init_

    self.__postinit__()

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerbuildingdatastruct.py", line 155, in _postinit_

    self.assemble()

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerbuildingbuild_main.py", line 439, in assemble

    priority_scripts.append(self.graph.add_script(script))

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerdependanalysis.py", line 265, in add_script

    self._top_script_node = super().add_script(pathname)

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 1433, in add_script

    self._process_imports(n)

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2850, in _process_imports

    target_module = self._safe_import_hook(*import_info, **kwargs)[0]

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2301, in _safe_import_hook

    target_modules = self.import_hook(

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 1505, in import_hook

    target_package, target_module_partname = self._find_head_package(

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 1684, in _find_head_package

    target_package = self._safe_import_module(

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerdependanalysis.py", line 387, in _safe_import_module

    return super()._safe_import_module(module_basename, module_name, parent_package)

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2062, in _safe_import_module

    self._process_imports(n)

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2850, in _process_imports

    target_module = self._safe_import_hook(*import_info, **kwargs)[0]

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2301, in _safe_import_hook

    target_modules = self.import_hook(

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 1505, in import_hook

    target_package, target_module_partname = self._find_head_package(

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 1684, in _find_head_package

    target_package = self._safe_import_module(

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerdependanalysis.py", line 387, in _safe_import_module

    return super()._safe_import_module(module_basename, module_name, parent_package)

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2062, in _safe_import_module

    self._process_imports(n)

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2850, in _process_imports

    target_module = self._safe_import_hook(*import_info, **kwargs)[0]

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2301, in _safe_import_hook

    target_modules = self.import_hook(

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 1518, in import_hook

    submodule = self._safe_import_module(head, mname, submodule)

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerdependanalysis.py", line 387, in _safe_import_module

    return super()._safe_import_module(module_basename, module_name, parent_package)

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2062, in _safe_import_module

    self._process_imports(n)

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2850, in _process_imports

    target_module = self._safe_import_hook(*import_info, **kwargs)[0]

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2301, in _safe_import_hook

    target_modules = self.import_hook(

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 1518, in import_hook

    submodule = self._safe_import_module(head, mname, submodule)

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerdependanalysis.py", line 387, in _safe_import_module

    return super()._safe_import_module(module_basename, module_name, parent_package)

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2062, in _safe_import_module

    self._process_imports(n)

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2850, in _process_imports

    target_module = self._safe_import_hook(*import_info, **kwargs)[0]

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2301, in _safe_import_hook

    target_modules = self.import_hook(

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 1518, in import_hook

    submodule = self._safe_import_module(head, mname, submodule)

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerdependanalysis.py", line 387, in _safe_import_module

    return super()._safe_import_module(module_basename, module_name, parent_package)

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2061, in _safe_import_module

    n = self._scan_code(module, co, co_ast)

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2645, in _scan_code

    self._scan_bytecode(

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2749, in _scan_bytecode

    for inst in util.iterate_instructions(module_code_object):

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerlibmodulegraphutil.py", line 147, in iterate_instructions

    yield from iterate_instructions(constant)

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libsite-packagesPyInstallerlibmodulegraphutil.py", line 139, in iterate_instructions

    yield from get_instructions(code_object)

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libdis.py", line 338, in _get_instructions_bytes

    argval, argrepr = _get_const_info(arg, constants)

    File "C:UsersAdministratorAppDataLocalProgramsPythonPython310libdis.py", line 292, in _get_const_info

    argval = const_list[const_index]

    IndexError: tuple index out of range

  8. SystemExit: pre-safe-import-module hook failed, needs fixing.

    That's the error I got, who knows, maybe this is with pyinstaller

    EDIT: Oh nevermind, this only works from 2.7 to 3.7. I use 3.9.

  9. I noticed one small quirk which I'm not sure if it's something I've missed or a limitation with pyinstaller. I have added an empty folder to the Additional Files section and that empty folder does not appear in the output.

    I have currently worked around it by placing a dummy file within the folder. Do you have any advice?

    Fantastic tool, I appreciate the great amount of work put into this.

Leave a Reply

Your email address will not be published.

© 2022 Code As Pro - Theme by WPEnjoy · Powered by WordPress