Skip to main content

depyinstaller

Extract PyInstaller-packed executables back to Python source .pyc files.

  • Automatically detects the Python version embedded in the executable
  • If your Python version doesn't match, tells you exactly which version to use
  • Filters out stdlib, third-party dependencies, and PyInstaller bootstrap files — only outputs your source code
  • Supports PyInstaller 2.0 ~ 6.19.0, Python 3.6+

Install

pip install depyinstaller

Usage

python -m depyinstaller -F <exe_file> -n <output_dir>

Example

python -m depyinstaller -F app.exe -n output

If the Python version matches, you'll get a clean output directory containing only user source .pyc files:

output/
  main.pyc
  pkg/
    __init__.pyc
    mod.pyc

If the version doesn't match:

[!] Python version mismatch: this exe requires Python 3.8, but you are running Python 3.14

[*] To fix this, install and run depyinstaller with Python 3.8:
      pip install depyinstaller  # using Python 3.8
      python -m depyinstaller -F app.exe -n output

How it works

  1. Extract — parses the PyInstaller archive (CArchive + PYZ) and extracts all embedded files
  2. Filter — identifies user source code by:
    • Selecting entry point scripts (excluding PyInstaller bootstrap like pyiboot*, pyi_rth_*)
    • Dynamically detecting third-party packages from binary extensions (.pyd/.so) and .dist-info metadata in the archive
    • Filtering out stdlib modules
    • Tracing imports recursively from entry points to find all user modules
  3. Output — copies only user .pyc files to the output directory, preserving the original package structure

License

GPL-3.0

Metadata

Release files for depyinstaller 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for depyinstaller 0.1.1
File Size Uploaded Provenance
depyinstaller-0.1.1.tar.gz 10.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for depyinstaller 0.1.1
File Interpreter ABI Platform
depyinstaller-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 23.7 kB

Release files / depyinstaller-0.1.1.tar.gz

Download URL depyinstaller-0.1.1.tar.gz
Size 10.6 kB
Tags Source
SHA-256 checksum
How to use checksums
4f44d63a7d7871d640037cfc7c36489cc1a692ec45b24cfa969a13bd30504c35
BLAKE2b-256 checksum
How to use checksums
ab3b6645ee468946c8bb37787497452af59981cfa1116ae898624cc52746e4fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.29 {"installer":{"name":"uv","version":"0.9.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / depyinstaller-0.1.1-py3-none-any.whl

Download URL depyinstaller-0.1.1-py3-none-any.whl
Size 13.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
787c552c149fdaef798d11cb66fd9ce12c2713382f19c887492493b486413a04
BLAKE2b-256 checksum
How to use checksums
17ef7025ecd884f1df1d2ef4ccfeaf372c09ff4b7d717628b48bd1d888598bd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.29 {"installer":{"name":"uv","version":"0.9.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for depyinstaller 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page