decompyle3
Python cross-version byte-code decompiler
What it is and what it does
Decompyle3 is a native Python decompiler that converts compiled Python bytecode (.pyc and .pyo files) back into human-readable source code. It accepts bytecode from Python 3.7 onwards and is a reworking of the uncompyle6 project, addressing control-flow detection issues by refactoring grammar and adding more specific markers in the instruction stream. The tool runs as a command-line utility and can optionally verify the syntax of decompiled output.
The package depends on click for CLI handling, spark-parser for grammar-based parsing, and xdis for cross-version bytecode disassembly. It is actively maintained and has no known security vulnerabilities. The author acknowledges numerous decompilation bugs exist (as with all CPython decompilers) and notes that as Python optimization increases, decompilation becomes harder; the tool does not currently support obfuscated code, Cython, MicroPython, or Windows EXE extraction.
Use it for:
- Recover source code from compiled Python packages when original source is unavailable or lost
- Analyze and audit third-party Python bytecode for security review or reverse-engineering
- Debug compiled Python applications by examining the decompiled bytecode logic
- Extract and study Python code from legacy or archived .pyc files for documentation or migration
- Test and validate decompilation correctness against Python's own test suite
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Decompyle3 translates Python bytecode back into equivalent Python source code for versions 3.7 and later, enabling reverse-engineering and analysis of compiled Python files.
Yes, if you need to decompile Python 3.7+ bytecode and accept the GPLv3 copyleft constraint. The tool is actively maintained, has low install friction, and carries no known vulnerabilities. Be aware that decompilation is imperfect—the author documents numerous known bugs and acknowledges that control-flow detection remains incomplete. Use the --syntax-verify option to validate output, and cross-check results with other decompilers when accuracy is critical.
Install
decompyle3 on PyPI
pip
pip install decompyle3uv
uv add decompyle3poetry
poetry add decompyle3Installing decompyle3
Before you install
Low friction installation with three runtime dependencies (click, spark-parser, xdis). Active maintenance with recent commits and no known vulnerabilities. Last release was 317 days ago; repository shows ongoing development.
License in practice
Licensed under GPLv3 (copyleft). Any derivative work or distribution must also be open-source under GPLv3; proprietary use or closed-source redistribution is not permitted.
Quickstart
pip install decompyle3
decompyle3 compiled-python-file.pyc
For syntax verification:
decompyle3 --syntax-verify compiled-python-file.pyc
Requires Python 3.7 or 3.8 to run; can only decompile bytecode from Python 3.7 onwards. Does not handle obfuscated code, Cython, MicroPython, or Py2EXE executables.
Verify before relying
- Extent of known decompilation bugs and their frequency in real-world bytecode
- Whether decompilation accuracy varies significantly across Python 3.7–3.13 versions
- Performance characteristics when handling large or complex bytecode files
Package facts
| License | GPL3 (copyleft) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — click, spark-parser, xdis |
| Maintenance | actively maintained — 317 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 286,099/month — #8,049 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: decompyle3-3.9.3-py37-none-any.whl; decompyle3-3.9.3-py38-none-any.whl; decompyle3-3.9.3-py39-none-any.whl; decompyle3-3.9.3-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
depyfDecompile and inspect the internal bytecode and…
permissive · top 5,000 on PyPI
uncompyle6uncompyle6 translates Python bytecode back into…
copyleft · top 15,000 on PyPI
xdisDisassembles Python bytecode from any Python…
copyleft · top 15,000 on PyPI
pycnitePycnite provides pure Python parsers for Python…
permissive · top 5,000 on PyPI
pycleanRemoves Python bytecode files (.pyc) and…
copyleft · top 15,000 on PyPI
bytecodebytecode generates and modifies Python bytecode…
permissive · top 1,000 on PyPI
ast-decompilerConverts Python abstract syntax trees (ASTs)…
permissive · top 15,000 on PyPI
pyc-wheelCompiles all Python source files (.py) in a…
permissive · top 15,000 on PyPI
ethereum-dasmDisassembles Ethereum EVM bytecode into…
copyleft · top 15,000 on PyPI
pyinstxtractor-ngExtracts Python bytecode and resources from…
copyleft · top 15,000 on PyPI