PYC EXE
File conversion

Convert PYC to EXE

QUICK ANSWER
Is it possible to convert PYC to EXE?
Yes - PYC converts to EXE.

Use PyInstaller (pyinstaller --onefile your_script.py) to create a standalone .exe that bundles the Python interpreter and all dependencies. A .pyc file alone is not a valid input - you need the original .py source files.

Also to EXE: PY · S · RB

On this page

Tested on macOS, Windows & Linux
Last verified Oct 2026

More free converters

HEIC, PNG, WEBP, MP3 and more - every tool here is free.

Open the toolbox

Why convert PYC to EXE?

The main reason to create an .exe is distribution: a packaged executable runs on Windows without Python installed, removing the setup requirement for end users or machines you do not control. A .pyc is bytecode that depends on the Python interpreter at runtime and cannot run as a standalone executable.

How to convert PYC to EXE

PyInstaller FREE

Install with pip install pyinstaller, run pyinstaller --onefile your_script.py, and find the resulting .exe in the dist/ folder. Use --noconsole for GUI apps and --icon=app.ico to set a custom icon.

cx_Freeze FREE

Install with pip install cx_Freeze, create a setup.py with your script as an Executable, and run python setup.py build; the output appears in a build/ folder that must be distributed as a whole.

About these formats

Quality & what to watch

  • You need the .py source files, not just the .pyc; if you only have a .pyc, decompile it first, knowing that decompilation is imperfect for Python 3.9 and newer.
  • The .exe produced is platform-specific - building on Windows creates a Windows executable and you cannot cross-compile to another OS.
  • Test the .exe on a clean machine without Python installed to confirm all imports and dependencies were captured correctly.

Frequently asked questions

What is the difference between PyInstaller and cx_Freeze?
PyInstaller supports a --onefile mode that produces a single self-contained .exe; cx_Freeze always produces a folder of files that must be kept together.
Can I build a .exe directly from a .pyc file?
No - PyInstaller and cx_Freeze require .py source files; if you only have a .pyc, decompile it back to .py first.
Will the .exe run on a machine without Python installed?
Yes - both tools bundle the Python interpreter and all dependencies into the output, so no Python installation is needed on the target machine.