Search code examples
pythonpython-3.xtkinterpygameauto-py-to-exe

Unable to install and or use auto-py-to-exe


I try to install Auto-Py-to-exe but they have a lot of error appear during the installation but at the end it sais successfully installed, see picture below. I have windows 10pro, PyCharm community 2020.3.3, and i use python 3.9.1 for almost all my projects. I have uninstall auto-Py-to-exe, piwin, PYpiwin32, pywin32, PyInstaller. Close all the system and reboot, re-install all these module, but nothing seem to work. It the same error when i use Python 3.6 or 3.7. the same error arrived in PyCharm terminal and in the promt(cmd) window terminal.

C:\Windows\system32>auto-py-to-exe
Traceback (most recent call last):
  File "c:\users\mélissa\appdata\local\programs\python\python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,  File "c:\users\mélissa\appdata\local\programs\python\python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)  File "C:\Users\Mélissa\AppData\Local\Programs\Python\Python39\Scripts\auto-py-to-exe.exe\__main__.py", line 7, in <module>
  File "c:\users\mélissa\appdata\local\programs\python\python39\lib\site-packages\auto_py_to_exe\__main__.py", line 291, in run
    if eel.chrome.get_instance_path() is not None and not disable_chrome:AttributeError: module 'eel.chrome' has no attribute 'get_instance_path'
C:\Windows\system32>

I have made the update of PIP, EEL, PYInstaller( the upper version they want to install is 3.2.1, the other fail), gevent and greenlet but i receive always the same error message.

I don't know what to do. I have check here for answer or direction to resolve my problem but i find nothing for now.

the error message in PYCharm, it the same in window terminal

auto-Py-to-exe successfully installed list of module in Python3.9.1


Solution

  • It appears, while looking at the traceback, that the error is in the source code, and not your own execution. Looking through the auto-py-to-exe GitHub repository files, it seems that the package just uses pyinstaller to convert the python script(s) to executable files. In this case, I would recommend just using pyinstaller itself.

    To convetr the .py file to a single file, run:

    pyinstaller my_script.py --onefile --windowed
    

    The .exe file will appear in a folder dist/ (created during the build). The build/ folder along with other files created during the process can be deleted.