frida / frida-python

Frida Python bindings
Other
787 stars 148 forks source link

Failed to load the Frida native extension: DLL load failed: Das angegebene Modul wurde nicht gefunden. #129

Open Vampire opened 7 years ago

Vampire commented 7 years ago

I used pip to install frida with Python on Windows 10 64 bit. But if I try to do python example.py as mentioned in the docs, I get

***
Failed to load the Frida native extension: DLL load failed: Das angegebene Modul wurde nicht gefunden.
Please ensure that the extension was compiled for Python 3.x.
***

Traceback (most recent call last):
  File "example.py", line 1, in <module>
    import frida
  File "C:\Program Files\Python35\lib\site-packages\frida\__init__.py", line 26, in <module>
    raise ex
  File "C:\Program Files\Python35\lib\site-packages\frida\__init__.py", line 6, in <module>
    import _frida
ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.

If I rename c:\Program Files\Python35\Lib\site-packages\_frida.cp35-win_amd64.pyd to something else, I get

***
Frida native extension not found
Please check your PYTHONPATH.
***

Traceback (most recent call last):
  File "example.py", line 1, in <module>
    import frida
  File "C:\Program Files\Python35\lib\site-packages\frida\__init__.py", line 26, in <module>
    raise ex
  File "C:\Program Files\Python35\lib\site-packages\frida\__init__.py", line 6, in <module>
    import _frida
ImportError: No module named '_frida'

What could be the problem and how to resolve it?

file /c/Program\ Files/Python35/lib/site-packages/_frida.cp35-win_amd64.pyd in Cygwin says /c/Program Files/Python35/lib/site-packages/_frida.cp35-win_amd64.pyd: PE32+ executable (DLL) (GUI) x86-64, for MS Windows.

Trying to execute /c/Program\ Files/Python35/lib/site-packages/_frida.cp35-win_amd64.pyd in Cygwin says bash: /c/Program Files/Python35/lib/site-packages/_frida.cp35-win_amd64.pyd: cannot execute binary file: Exec format error

Vampire commented 7 years ago

Is there maybe some hard-coded dependency on python 3.6 somewhere? If I install Python 3.6 and use it there, it works fine. Doing strings /c/Program\ Files/Python35/lib/site-packages/_frida.cp35-win_amd64.pyd | grep python reveals python36.dll.

littlehacker26 commented 6 years ago

I met a same problem, Do you solve it now ?

airwolf2026 commented 5 years ago

same problem on python3.6, which is installed from vs2017

BraianNunes commented 5 years ago

Same problem here!

airwolf2026 commented 5 years ago

Same problem here!

i has fixed the problem by using python3.7