--- id: uncompyle6 version: "3.9.3" license: GPL3 license_treatment: copyleft maintenance: active --- # uncompyle6 — Python cross-version byte-code decompiler License: copyleft · Maintenance: active · Downloads: 494.5K/mo ## What it is and what it does uncompyle6 is a Python bytecode decompiler that reconstructs source code from compiled .pyc and .pyo files. It spans Python versions 1.0 through 3.8 and PyPy bytecodes, making it one of the few tools that handles such a wide historical range. Unlike simpler decompilers, it builds a parse tree using compiler technology to understand bytecode structure deeply, allowing it to deparse not just complete files but also code fragments at specific bytecode offsets—useful for runtime debugging and stack trace enhancement. The tool depends on click for CLI handling, spark-parser for parsing, and xdis for bytecode analysis. It is actively maintained and has no known security vulnerabilities. The GPLv3 license means any derivative work must remain open-source. It is most useful when you have only compiled bytecode and need to recover or understand the original source, or when you need to inspect bytecode fragments at runtime for debugging purposes. Use it for: - Recover source code from legacy .pyc files when original source is lost or unavailable. - Analyze and understand obfuscated or compiled Python bytecode for security auditing. - Extract code fragments at specific bytecode offsets for enhanced stack traces in debuggers. - Verify decompilation correctness by comparing bytecode across Python versions. - Inspect PyPy bytecode or bytecode from Python 1.x–2.7 when other tools only support modern versions. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. uncompyle6 translates Python bytecode back into equivalent Python source code, supporting Python versions from 1.0 through 3.8 and PyPy bytecodes. Yes, if you need to decompile Python bytecode. uncompyle6 is actively maintained, has no security vulnerabilities, and offers the broadest Python version support (1.0–3.8 + PyPy) among available decompilers. The GPLv3 license is a hard constraint for proprietary use; open-source projects face no barrier. Install friction is low. Decompilation quality varies by Python version (strongest around 3.3–3.4, weaker at the extremes), so verify output for your target bytecode version. ## Install pip install uncompyle6 uv add uncompyle6 poetry add uncompyle6 ## Installing uncompyle6 Before you install: Low install friction with pure-Python wheels for multiple Python versions (3.6–3.9). Actively maintained as of 2026-04-24 with 4317 repository stars and no known security vulnerabilities. License in practice: GPLv3 copyleft license: any derivative work or distribution must also be open-source under GPLv3. Suitable for open-source projects; proprietary applications cannot incorporate this code without licensing compliance. Quickstart: pip install uncompyle6 uncompyle6 compiled-python-file.pyc Requires a .pyc or .pyo file as input; bytecode must originate from a Python version the tool recognizes (1.0–3.8 or PyPy). Verify before relying: - Exact Python version requirements for running uncompyle6 itself (description mentions git branches but not minimum runtime version). - Whether fragment deparsing and runtime bytecode offset association are accessible via public API or CLI. - Decompilation accuracy rates for specific Python versions beyond 3.8. ## Package facts - License: GPL3 (copyleft) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 494.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags python bytecode decompiler, decompile pyc files, reverse engineer python bytecode, bytecode to source code, python decompilation tool, pyc to py converter, cross-version python decompiler, bytecode-analysis, reverse-engineering, debugging [View on SkillFed](https://skillfed.io/packages/uncompyle6) · [View on PyPI](https://pypi.org/project/uncompyle6/)