Rujeerat Aomm
Rujeerat Aomm

Reputation: 1

Using f2py get ImportError: DLL load failed: The specified module could not be found

I'm trying to create python module on Pycharm. i did this

f2py -c area.f90 -m AREA

the module was created but the module file(AREAmodule) was not built so when i import and run it show the error like this

Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.3\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 module could not be found.

Does anyone has any suggestions?

Upvotes: 0

Views: 1032

Answers (1)

Gokul P
Gokul P

Reputation: 11

For me the dll is created in the sub directory module_name\.libs\libmodule_namexxxxx.dll, when I copy it to my source directory, It works!!!.

You can check for the dependency in the module via depends.exe, I load my module in depends, it automatically tells me I need those dll.

Upvotes: 1

Related Questions