ImportError: DLL load failed: The specified procedure could not be found.

Answered

 This is similar but different to the other DLL load failed issues.

When I run PyCharm and try to import a library as follows

from PyQt5.Qt3DCore import QEntity
Traceback (most recent call last):
  File "C:\Program Files\JetBrains\PyCharm 2017.1.7\helpers\pydev\_pydevd_bundle\pydevd_exec2.py", line 3, in Exec
    exec(exp, global_vars, local_vars)
  File "<input>", line 1, in <module>
  File "C:\Program Files\JetBrains\PyCharm 2017.1.7\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
ImportError: DLL load failed: The specified procedure could not be found.

Yet when I run the command form a python console (started within PyCharm) I get no errors.

If I run Python in a command window it also works!

I've been pulling my hair out on this one.

Does anyone know how the module loader is searching for the DLLs? An which DLLs is it searching for?

Why does the python console work but neither the debugger nor the running program works within PyCharm! 

 

4 comments

Hi Pat, could you please check import os; print(os.environ['PATH']) in the console and in run/debug? Are there any differences?

0

Could you please enable Settings | Tools | Python Scientific | Show plots in toolwindow option? Has it helped to prevent an exception?

0

 I had a similar problem which I resolved actually by turning off Settings | Tools | Python Scientific | Show plots in toolwindow

0

The corresponding ticket in the bug tracker for future references: PY-27234.

0

Please sign in to leave a comment.