HexRaysPyTools icon indicating copy to clipboard operation
HexRaysPyTools copied to clipboard

IDA 7.7 Python script error

Open sonerfromnurland opened this issue 2 years ago • 3 comments

I got the following errors. How can it be fixed? Thanks.

ida version: Version 7.7.220118 Windows x64 (64-bit address size) python command from powershell:

Python 3.10.3 (tags/v3.10.3:a342a49, Mar 16 2022, 13:07:40) [MSC v.1929 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.

itismysystempath\IDA_7.7\plugins\auto_re.py: DLL load failed while importing sip: The specified module could not be found.
Traceback (most recent call last):
  File "itismysystempath\IDA_7.7\python\3\ida_idaapi.py", line 580, in IDAPython_ExecScript
    exec(code, g)
  File "//Mac/Home/Downloads/IDA_7.7/plugins/auto_re.py", line 20, in <module>
    from PyQt5 import QtGui, QtCore
ImportError: DLL load failed while importing sip: The specified module could not be found.

BinDiff 7 (@377901646, Jun  7 2021), (c)2004-2011 zynamics GmbH, (c)2011-2021 Google LLC.
BinExport 12 (@377901646, Jun  7 2021), (c)2004-2011 zynamics GmbH, (c)2011-2021 Google LLC.
itismysystempath\IDA_7.7\plugins\findcrypt3.py: No module named 'yara'
Traceback (most recent call last):
  File "itismysystempath\IDA_7.7\python\3\ida_idaapi.py", line 580, in IDAPython_ExecScript
    exec(code, g)
  File "//Mac/Home/Downloads/IDA_7.7/plugins/findcrypt3.py", line 9, in <module>
    import yara
ModuleNotFoundError: No module named 'yara'

itismysystempath\IDA_7.7\plugins\keypatch.py: No module named 'keystone'
Traceback (most recent call last):
  File "itismysystempath\IDA_7.7\python\3\ida_idaapi.py", line 580, in IDAPython_ExecScript
    exec(code, g)
  File "//Mac/Home/Downloads/IDA_7.7/plugins/keypatch.py", line 53, in <module>
    from keystone import *
ModuleNotFoundError: No module named 'keystone'

itismysystempath\IDA_7.7\plugins\LazyIDA.py: cannot import name 'QApplication' from 'PyQt5.Qt' (itismysystempath\IDA_7.7\python\3\PyQt5\Qt.pyd)
Traceback (most recent call last):
  File "itismysystempath\IDA_7.7\python\3\ida_idaapi.py", line 580, in IDAPython_ExecScript
    exec(code, g)
  File "//Mac/Home/Downloads/IDA_7.7/plugins/LazyIDA.py", line 8, in <module>
    from PyQt5.Qt import QApplication
ImportError: cannot import name 'QApplication' from 'PyQt5.Qt' (itismysystempath\IDA_7.7\python\3\PyQt5\Qt.pyd)

itismysystempath\IDA_7.7\plugins\SyncPlugin.py: DLL load failed while importing sip: The specified module could not be found.
Traceback (most recent call last):
  File "itismysystempath\IDA_7.7\python\3\ida_idaapi.py", line 580, in IDAPython_ExecScript
    exec(code, g)
  File "//Mac/Home/Downloads/IDA_7.7/plugins/SyncPlugin.py", line 42, in <module>
    from PyQt5 import QtCore, QtWidgets
ImportError: DLL load failed while importing sip: The specified module could not be found.

sonerfromnurland avatar Sep 16 '22 13:09 sonerfromnurland

looks like qt, yara is not installed properly?

singleghost2 avatar Nov 07 '22 01:11 singleghost2

I think you need to install python 3.9 then uses idapyswitch.exe (as admin) to switch to the python 3.9 install. I had the same error before configuring python correctly

hsreina avatar Nov 30 '22 23:11 hsreina

The following works for me.

https://github.com/L4ys/LazyIDA/pull/16 There is a file called "sip.cp39-win_amd64.pyd" in python3.9 library, and replace sip.pyd in IDA7.5\python\3\PyQt5 with it.

helloobaby avatar Dec 07 '22 16:12 helloobaby