uncompyle6
github.com
What it is
uncompyle6 is a free, GPL-3.0-licensed tool for translating compiled Python bytecode into equivalent Python source code. It runs on `.pyc` and `.pyo` files from the command line, and can also deparse code fragments or return source information around a bytecode offset. The README lists bytecode from Python 1.0 through 3.8, Dropbox Python 2.5 bytecode, and some PyPy bytecode as accepted inputs. Fragment deparsing is used in trepan debuggers to show source at runtime and can provide more stack-trace detail than a line number. The `--syntax-verify` option checks decompiled syntax when used with the matching bytecode version. Control-flow handling remains a major challenge, and some incorrect decompilations may be detected and reported. The tool does not handle obfuscated code, Cython, or MicroPython, and cannot directly decompile Py2EXE executables. Python 3.7 and 3.8 support is generally better in the related decompile3 project. Installation is through PyPI for Python 3.11 and later, or a GitHub Releases file for earlier Python versions. Platforms listed include Linux, macOS, Windows, and self-hosted use.
Spec sheet
- What it does
- uncompyle6 translates Python bytecode back into equivalent Python source code.Read 8 Oct 2026 · github.com
- Purpose
- uncompyle6 translates Python bytecode into equivalent Python source code.Read 8 Oct 2026 · github.com
- Support
- The maintainer says bug reports may take a while to receive attention and that sponsoring or supporting the project can prioritize issues.Read 8 Oct 2026 · github.com
- License
- The repository identifies the project as GPL-3.0 licensed.Read 8 Oct 2026 · github.com
- Bytecode versions
- The README says it accepts bytecode from Python 1.0 through 3.8, plus Dropbox Python 2.5 bytecode and some PyPy bytecode.Read 8 Oct 2026 · github.com
- Command line
- The README shows running `uncompyle6` on compiled Python `.pyc` or `.pyo` files.Read 8 Oct 2026 · github.com
- Debugger use
- The maintainer says fragment deparsing is used in trepan debuggers to show source fragments at runtime.Read 8 Oct 2026 · github.com
- Debugging use
- The maker says fragment deparsing can help show stack traces with more detail than a line number and is used in the maker’s trepan debuggers.Read 8 Oct 2026 · github.com
- Fragment decompilation
- It can deparse code fragments and provide source information around a bytecode offset.Read 8 Oct 2026 · github.com
- Installation
- For Python 3.11 and later, the README instructs users to install from PyPI with `pip install uncompyle6`.Read 8 Oct 2026 · github.com
- Intended audience
- PyPI lists developers as the intended audience.Read 8 Oct 2026 · pypi.org
- Known limitation
- The README identifies control-flow handling as a major decompilation problem and says erroneous decompilations may sometimes be detected and reported.Read 8 Oct 2026 · github.com
- Older Python installation
- For Python versions before 3.11, the README directs users to install from a file in the GitHub Releases section.Read 8 Oct 2026 · github.com
- Operating systems
- PyPI classifies the package as operating-system independent.Read 8 Oct 2026 · pypi.org
- Syntax verification
- The `--syntax-verify` option checks decompiled syntax when used with the matching Python bytecode version.Read 8 Oct 2026 · github.com
- Unsupported inputs
- The README says it does not handle obfuscated code, Cython, or MicroPython, and cannot directly decompile Py2EXE executables.Read 8 Oct 2026 · github.com
- Version caveat
- The README says Python 3.7 and 3.8 support is generally better in the related decompile3 project.Read 8 Oct 2026 · github.com
Plans and prices
Strong points and limits
Strong points
- Free and GPL-3.0 licensed.
- Can deparse fragments around bytecode offsets.
- Includes syntax verification for matching bytecode versions.
- Runs on Linux, macOS, Windows, and self-hosted systems.
Limits
- Does not handle obfuscated code, Cython, or MicroPython.
- Cannot directly decompile Py2EXE executables.
- Control-flow handling can produce erroneous results.
- Python 3.7 and 3.8 support is generally better elsewhere.
Who it suits
It is aimed at developers who need to inspect or decompile Python bytecode, including those using fragment output in debugging workflows. It may not suit work involving obfuscated code or the unsupported input types listed.
Verdict
uncompyle6 provides command-line bytecode decompilation plus fragment-level output for debugging use. Its supported bytecode range and input limitations matter when choosing it for a particular Python artifact.
Where Specifiction places it
- Reverse Engineering Tools#34 of 737.6
- Decompiler Software#15 of 247.6