{"id":27056,"library":"idapro","title":"IDAPython (IDA Pro Python SDK)","description":"IDAPython is the official Python SDK for Hex-Rays IDA Pro disassembler. This PyPI package (version 0.0.8) provides the `idapython` module that allows loading and executing IDA scripts from outside IDA. It is a thin wrapper that communicates with a running IDA instance via IPC. Note that the standard IDAPython API (ida_*, idc, idautils) is only available inside IDA's embedded Python, not from this external package. Use for automation, script launching, and headless analysis.","status":"active","version":"0.0.8","language":"python","source_language":"en","source_url":"https://github.com/RocketGod-git/idapro","tags":["idapro","ida","disassembler","hex-rays","reverse-engineering","python-sdk"],"install":[{"cmd":"pip install idapro","lang":"bash","label":"Default install"}],"dependencies":[{"reason":"Required on Windows for IPC","package":"pywin32","optional":true}],"imports":[{"note":"Correct import of the external wrapper package","wrong":"","symbol":"idapro","correct":"import idapro"},{"note":"The actual module is nested, direct import 'idapython' fails with ModuleNotFoundError","wrong":"import idapython","symbol":"idapython","correct":"from idapro import idapython"},{"note":"idaapi is not available from the 'idapro' package; many users try to import standard IDAPython modules outside IDA and get ImportError","wrong":"import idaapi  # outside IDA","symbol":"idaapi","correct":"import idaapi  # only inside IDA's embedded Python"}],"quickstart":{"code":"import idapro\nida = idapro.IDAPython()\nida.execute(\"print('Hello from IDA')\")\nida.close()","lang":"python","description":"Connect to a running IDA instance and execute a Python statement inside IDA's embedded Python environment."},"warnings":[{"fix":"Use 'import idapro' only for the external wrapper. For standard IDAPython scripting, work inside IDA or use IDA's built-in Python environment.","message":"The 'idapro' package (PyPI version 0.0.8) is NOT the standard IDAPython SDK. The standard IDA Python modules (ida_*, idc, idautils) are NOT available via 'import idapro'. They are only available inside IDA's embedded Python interpreter.","severity":"breaking","affected_versions":"all"},{"fix":"Start IDA Pro and open a database before running scripts that use 'idapro'.","message":"When using idapro.IDAPython(), ensure IDA Pro is already running and the IDAPython plugin is loaded. The connection may fail silently or with unclear errors if IDA is not ready.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'from idapro import idapython' or simply 'import idapro' and call 'idapro.IDAPython()'.","message":"Some older examples use 'idapython.IDAPython()' directly. This is no longer correct; you must import via 'from idapro import idapython' or use 'import idapro' and then 'idapro.IDAPython()'.","severity":"deprecated","affected_versions":"0.0.8"},{"fix":"For non-blocking execution, check if 'ida.exec_async' is available or run code that completes quickly.","message":"The 'execute' method runs code synchronously. For long-running scripts, use 'exec_async' (if available) or spawn a thread. The default timeout may cause script to hang.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'from idapro import idapython' or 'import idapro' then 'idapro.idapython'","cause":"Trying to import 'idapython' directly, but it is a submodule of 'idapro'.","error":"ModuleNotFoundError: No module named 'idapython'"},{"fix":"Ensure IDA Pro is running with a database open. Check IDA's output window for errors. Restart IDA and try again.","cause":"IDA Pro is not running, or the IDAPython plugin is not loaded, or the communication port is not open.","error":"idapro.IDAProException: No response from IDA (timeout)"},{"fix":"These modules are only available inside IDA. Use 'idapro.execute()' to run scripts that import 'idaapi' inside IDA.","cause":"Attempting to import standard IDAPython modules (idaapi, idc, idautils) outside of IDA's embedded Python environment.","error":"ImportError: No module named 'idaapi'"},{"fix":"Update idapro: 'pip install --upgrade idapro'. Ensure you have version 0.0.8 or later.","cause":"Outdated version of idapro (<0.0.8) or using an older API where the class was named differently.","error":"AttributeError: module 'idapro' has no attribute 'IDAPython'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}