Ghidra Downloadguide indépendant de téléchargement et d’installation
Français
PYTHON AUTOMATION

Installer PyGhidra et démarrer rapidement

PyGhidra relie CPython 3 natif à l’API de Ghidra. Ce guide couvre versions, installation, configuration, premier script et dépannage.

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

Présentation de PyGhidra

PyGhidra est la bibliothèque officielle pour utiliser l’API de Ghidra depuis CPython 3 natif. Elle intègre projets, programmes, symboles et analyses dans des workflows Python reproductibles.

PyGhidra est la bibliothèque officielle pour utiliser l’API de Ghidra depuis CPython 3 natif. Elle intègre projets, programmes, symboles et analyses dans des workflows Python reproductibles.

PYGHIDRA

Prérequis et versions

La version actuelle est PyGhidra 3.1.0, publiée le 14 mai 2026. Elle demande Python 3.9 ou plus récent, Ghidra 12.0 ou plus récent et un JDK 21 compatible.

La version actuelle est PyGhidra 3.1.0, publiée le 14 mai 2026. Elle demande Python 3.9 ou plus récent, Ghidra 12.0 ou plus récent et un JDK 21 compatible.

PYGHIDRA

Installer PyGhidra

Créez un environnement virtuel dédié. Installez depuis PyPI ou utilisez le paquet hors ligne de la distribution officielle. N’utilisez pas un EXE tiers.

Créez un environnement virtuel dédié. Installez depuis PyPI ou utilisez le paquet hors ligne de la distribution officielle. N’utilisez pas un EXE tiers.

  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

Relier PyGhidra à Ghidra

GHIDRA_INSTALL_DIR doit viser la racine extraite de Ghidra. On peut aussi passer install_dir à pyghidra.start().

GHIDRA_INSTALL_DIR doit viser la racine extraite de Ghidra. On peut aussi passer install_dir à pyghidra.start().

Ghidra pathGHIDRA_INSTALL_DIR=<path-to-ghidra-root>
Installer PyGhidra et démarrer rapidement
Relier PyGhidra à Ghidra
PYGHIDRA

Première automatisation

Démarrez Ghidra une fois par processus, ouvrez un échantillon autorisé dans un contexte et écrivez les résultats hors du dossier d’installation.

Démarrez Ghidra une fois par processus, ouvrez un échantillon autorisé dans un contexte et écrivez les résultats hors du dossier d’installation.

Minimal examplefrom pathlib import Path import pyghidra with pyghidra.open_program(Path('sample.exe')) as api: print(api.getCurrentProgram().getName())
Première automatisation
Première automatisation
PYGHIDRA

Problèmes fréquents

Vérifiez interpréteur Python, java -version, racine Ghidra et compatibilité. Considérez binaires et scripts externes comme non fiables.

Vérifiez interpréteur Python, java -version, racine Ghidra et compatibilité. Considérez binaires et scripts externes comme non fiables.

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 est la bibliothèque officielle pour utiliser l’API de Ghidra depuis CPython 3 natif. Elle intègre projets, programmes, symboles et analyses dans des workflows Python reproductibles.

Which Python version is required?

Python 3.9 or later.

Why can it not find Ghidra?

GHIDRA_INSTALL_DIR doit viser la racine extraite de Ghidra. On peut aussi passer install_dir à pyghidra.start().

Does it replace analyzeHeadless?

No. Choose the workflow that fits the pipeline.

Is PyGhidra MCP the same project?

No. MCP tools are separate projects.