Registry / serialization / decompyle3

decompyle3

JSON →
library3.9.3pypypi✓ verified 85d ago

Python cross-version byte-code decompiler targeting Python 3.7-3.8 bytecode. Current version is 3.9.3 (2025). Releases are sporadic, roughly once per year. Requires xdis (6.x) and spark-parser. Supports running on CPython up to 3.13 but only decompiles bytecode up to 3.8.

pip install decompyle3
INSTALL
IMPORT
SIG · DECOMPYLE3
D
decompyle3
serializationpythonv3.9.3
Install
2.5s avg
Import
Disk
21MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.9.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 22.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.5s · import 0.000s · 23MB
21MB installed
● package 21MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

decompile_file
from decompyle3 import decompile_file
from decompyle3 import decompile

Decompile a .pyc file to stdout. Requires Python 3.7-3.8 bytecode.

from decompyle3 import decompile_file import sys # Decompile a .pyc file and print source out = sys.stdout with open('example.pyc', 'rb') as fp: decompile_file(out, fp)
decompyle3 --version
Debug
Known issues
breakingdecompyle3 only decompiles Python 3.7 and 3.8 bytecode. It cannot decompile bytecode from Python 3.9+.
fix
Use uncompyle6 for Python 2.7-3.8, or try pycdc/decompyle3-fork for newer bytecode.
affects: all
gotchaThe package requires xdis version 6.x, which may conflict with other tools that require xdis 5.x or 4.x.
fix
Use a virtual environment to isolate decompyle3 from other projects with different xdis requirements.
affects: >=3.8.0
gotchaCommand-line tool is `decompyle3`, not `decompyle`. Running `decompyle` will fail with 'command not found'.
fix
Install and run `decompyle3 filename.pyc`.
affects: all
deprecatedSupport for Python 2.x has been removed. Use uncompyle6 for Python 2.7.
fix
Install uncompyle6 for Python 2 decompilation.
affects: >=3.0
Upgrade
Version history
3.9.3latest on PyPI · released Oct 1, 2025
Audit
Dependencies
xdisrequiredRequired for bytecode disassembly and interpretation
spark-parserrequiredRequired for parsing decompiled tokens
Agent activity
18 hits · last 30 days
node
14
OpenAI (training)
2
Resources
decompyle3 — pip install decompyle3 · libregistry