Ghidra Download非公式ダウンロード・インストールガイド
日本語
PYTHON AUTOMATION

PyGhidraのインストールとクイックスタート

PyGhidraはネイティブCPython 3からGhidra APIを利用する公式統合です。対応版、導入、設定、初回スクリプト、エラー対策を説明します。

PyGhidra on PyPI
PyGhidra3.1.0
Ghidra12.0+
Python3.9+
Verified2026-07-22
PYGHIDRA

PyGhidraとは

PyGhidraはネイティブCPython 3からGhidra APIを利用する公式ライブラリです。プロジェクト、プログラム、シンボル、解析機能を再現可能なPython処理へ組み込めます。

PyGhidraはネイティブCPython 3からGhidra APIを利用する公式ライブラリです。プロジェクト、プログラム、シンボル、解析機能を再現可能なPython処理へ組み込めます。

PYGHIDRA

要件と確認済みバージョン

現行版は2026年5月14日公開のPyGhidra 3.1.0です。Python 3.9以降、Ghidra 12.0以降、対応するJDK 21が必要です。

現行版は2026年5月14日公開のPyGhidra 3.1.0です。Python 3.9以降、Ghidra 12.0以降、対応するJDK 21が必要です。

PYGHIDRA

インストール方法

専用仮想環境を作り、PyPIまたは公式Ghidra配布物内のオフラインパッケージから導入します。第三者EXEは不要です。

専用仮想環境を作り、PyPIまたは公式Ghidra配布物内のオフラインパッケージから導入します。第三者EXEは不要です。

  1. 1

    Virtual environment

    Isolate dependencies.

    python -m venv .venv
  2. 2

    Install

    Use the active interpreter.

    python -m pip install --upgrade pyghidra==3.1.0
  3. 3

    Offline option

    Use the official bundled package.

    python -m pip install --no-index -f <GhidraInstallDir>/Ghidra/Features/PyGhidra/pypkg/dist pyghidra
PYGHIDRA

Ghidraとの接続

GHIDRA_INSTALL_DIRを展開済みGhidraルートへ設定するか、pyghidra.start()へinstall_dirを渡します。

GHIDRA_INSTALL_DIRを展開済みGhidraルートへ設定するか、pyghidra.start()へinstall_dirを渡します。

Ghidra pathGHIDRA_INSTALL_DIR=<path-to-ghidra-root>
PyGhidraのインストールとクイックスタート
Ghidraとの接続
PYGHIDRA

最初の自動解析

Pythonプロセスごとに一度起動し、解析権限のあるサンプルをコンテキスト内で開き、結果を本体外へ保存します。

Pythonプロセスごとに一度起動し、解析権限のあるサンプルをコンテキスト内で開き、結果を本体外へ保存します。

Minimal examplefrom pathlib import Path import pyghidra with pyghidra.open_program(Path('sample.exe')) as api: print(api.getCurrentProgram().getName())
最初の自動解析
最初の自動解析
PYGHIDRA

よくある問題

Python実行環境、java -version、Ghidraルート、互換性を確認します。外部バイナリやスクリプトは信頼しない前提で扱います。

Python実行環境、java -version、Ghidraルート、互換性を確認します。外部バイナリやスクリプトは信頼しない前提で扱います。

SymptomCauseCheck
Import errorWrong environmentpython -m pip show pyghidra
Java errorWrong JDKjava -version
Path errorWrong rootGHIDRA_INSTALL_DIR
API mismatchVersion boundaryPyGhidra 3.x + Ghidra 12.0+
FAQ

PyGhidra FAQ

Is PyGhidra included with Ghidra?

PyGhidraはネイティブCPython 3からGhidra APIを利用する公式ライブラリです。プロジェクト、プログラム、シンボル、解析機能を再現可能なPython処理へ組み込めます。

Which Python version is required?

Python 3.9 or later.

Why can it not find Ghidra?

GHIDRA_INSTALL_DIRを展開済みGhidraルートへ設定するか、pyghidra.start()へinstall_dirを渡します。

Does it replace analyzeHeadless?

No. Choose the workflow that fits the pipeline.

Is PyGhidra MCP the same project?

No. MCP tools are separate projects.