capa icon indicating copy to clipboard operation
capa copied to clipboard

PyQt - ImportError: DLL load failed while importing sip: The specified module could not be found.

Open AVman1 opened this issue 4 years ago • 4 comments

C:\Program Files\IDA Pro 7.5 SP3\plugins\capa_explorer.py: DLL load failed while importing sip: The specified module could not be found.
Traceback (most recent call last):
  File "C:\Program Files\IDA Pro 7.5 SP3\python\3\ida_idaapi.py", line 616, in IDAPython_ExecScript
    exec(code, g)
  File "C:/Program Files/IDA Pro 7.5 SP3/plugins/capa_explorer.py", line 9, in <module>
    from capa.ida.plugin import CapaExplorerPlugin
  File "C:\Python39\lib\site-packages\capa\ida\plugin\__init__.py", line 14, in <module>
    from capa.ida.plugin.form import CapaExplorerForm
  File "C:\Python39\lib\site-packages\capa\ida\plugin\form.py", line 18, in <module>
    import ida_settings
  File "C:\Python39\lib\site-packages\ida_settings\__init__.py", line 1, in <module>
    from .ida_settings import IDASettings, PermissionError
  File "C:\Python39\lib\site-packages\ida_settings\ida_settings.py", line 168, in <module>
    QtCore = import_qtcore()
  File "C:\Python39\lib\site-packages\ida_settings\ida_settings.py", line 141, in import_qtcore
    from PyQt5 import QtCore
ImportError: DLL load failed while importing sip: The specified module could not be found.

Running Python3.9.0 and IDA 7.5 SP3 here, when i try to manually import that from command prompt on my windows OS it works but the same fails in IDA. Ideas?

AVman1 avatar Jul 22 '21 09:07 AVman1

Can you double-check your IDA is using the correct Python where you setup capa?

mr-tz avatar Jul 22 '21 09:07 mr-tz

It seem this is helpful to solve this problem: https://github.com/joxeankoret/diaphora/issues/173

Ana06 avatar Mar 29 '22 02:03 Ana06

the above instructions seem to help with this bug. otherwise, we're not able to reproduce the issue. please reopen if the issue is encountered again.

williballenthin avatar Jun 28 '22 16:06 williballenthin

I get this error also with IDA 8.2 and Python 3.9.13:

Python>import sys
Python>print(sys.version)
3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)]
Python>
Python>from PyQt5 import QtCore, QtGui, QtWidgets
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: DLL load failed while importing sip: The specified module could not be found.

This appears to be a bug in IDA but it affects capa explorer. Updating to Python 3.10 solved the issue for me, but Python 3.9 is widely used being for example the default in Windows 10.

Ana06 avatar Sep 27 '23 17:09 Ana06