User2000
User2000

Reputation: 119

ImportError: DLL load failed while importing _greenlet: The specified module could not be found

I tried running the command "python -m auto_py_to_exe" on Visual Studio Code/Command Prompt on a Windows 10 Virtual Machine using Python 3.9.0, Python 3.10.0/3.10.11 as well as Python 3.11.

However, I always get the following:

Traceback (most recent call last):
  File "C:\Users\Anwar Hamada\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\Anwar Hamada\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\Anwar Hamada\AppData\Local\Programs\Python\Python39\lib\site-packages\auto_py_to_exe\_main_.py", line 10, in <module>
    from . import ui
  File "C:\Users\Anwar Hamada\AppData\Local\Programs\Python\Python39\lib\site-packages\auto_py_to_exe\ui.py", line 5, in <module>
    import eel
  File "C:\Users\Anwar Hamada\AppData\Local\Programs\Python\Python39\lib\site-packages\eel\_init_.py", line 12, in <module>
    from gevent.threading import Timer
  File "C:\Users\Anwar Hamada\AppData\Local\Programs\Python\Python39\lib\site-packages\gevent\_init_.py", line 86, in <module>
    from gevent._hub_local import get_hub
  File "C:\Users\Anwar Hamada\AppData\Local\Programs\Python\Python39\lib\site-packages\gevent\_hub_local.py", line 101, in <module>
    import_c_accel(globals(), 'gevent.__hub_local')
  File "C:\Users\Anwar Hamada\AppData\Local\Programs\Python\Python39\lib\site-packages\gevent\_util.py", line 148, in import_c_accel
    mod = importlib.import_module(cname)
  File "C:\Users\Anwar Hamada\AppData\Local\Programs\Python\Python39\lib\importlib\_init_.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "src\\gevent\\_hub_local.py", line 1, in init gevent._gevent_c_hub_local
  File "C:\Users\Anwar Hamada\AppData\Local\Programs\Python\Python39\lib\site-packages\greenlet\_init_.py", line 29, in <module>
    from ._greenlet import _C_API # pylint:disable=no-name-in-module
ImportError: DLL load failed while importing _greenlet: The specified module could not be found.

Although I tried adding the path for Python installation several times to the environment system variables in addition to running the "pyinstaller" command directly, I still encounter the same issue.

Any suggestions?

Upvotes: 0

Views: 590

Answers (0)

Related Questions