FileInfo

Languages

Overview

What is a PYC file? A PYC file is a compiled version of a Python script ( .PY file). When Python code is executed, the interpreter compiles the script into bytecode and then saves it as a PYC file. PYC files allow Python to run the program more efficiently since the code doesn’t need to be recompiled each time it is executed.

More Information Python typically automatically generates a PYC file when you run a Python script, then stores it in a __pycache__ folder. The PYC file allows the Python interpreter to skip the compilation process on subsequent runs, improving performance, especially for larger applications.

Popularity3.7/5

72 votes

Quick AppUsed by
VerifiedVerified by FileInfo.com The FileInfo.com team has independently researched the Python Compiled file format and Mac, Windows, and Linux apps listed on this page. Our goal is 100% accuracy and we only publish information about file types that we have verified. If you would like to suggest any additions or updates to this page, please let us know .

Python Software Foundation Python 3.4 Icon

Breadcrumbs

DeveloperPython Software Foundation
Popularity3.7 | 72 Votes

Previous / Next

In-Depth

.PYC File Extension

Python Compiled File

DeveloperPython Software Foundation
Popularity
3.7  |  72 Votes
 

What is a PYC file?

A PYC file is a compiled version of a Python script ( .PY file). When Python code is executed, the interpreter compiles the script into bytecode and then saves it as a PYC file. PYC files allow Python to run the program more efficiently since the code doesn’t need to be recompiled each time it is executed.

More Information

Python typically automatically generates a PYC file when you run a Python script, then stores it in a __pycache__ folder. The PYC file allows the Python interpreter to skip the compilation process on subsequent runs, improving performance, especially for larger applications.

How to open a PYC file

You should not attempt to open or modify PYC files. Instead, Python references the files internally to decrease program execution time.

Warning

PYC files may be targeted and infected by various types of malware, including the Python.Pytroj virus, to interleave harmful code into the binaries of Python applications that reference the infected PYC files. To protect against PYC files that have been potentially infected by a virus, install an antivirus program on your computer that detects viruses like the Python.Pytroj virus.

Open over 400 file formats with File Viewer Plus . Free Download

Programs that open or reference PYC files

Sort

Pricing

Program Name

Platform

Reset

X

Windows

Python Software Foundation Python

Free

Mac

Python Software Foundation Python

Free

Linux

Python Software Foundation Python

Free

Category: Executable Files

Updated: September 16, 2024

FAQ

What is a PYC file?
A PYC file is a compiled version of a Python script (.PY file). When Python code is executed, the interpreter compiles the script into bytecode and then saves it as a PYC file. PYC files allow Python to run the program more efficiently since the code doesn’t need to be recompiled each time it is executed.
How do I open a .pyc file?
You should not attempt to open or modify PYC files. Instead, Python references the files internally to decrease program execution time.