Skip to main content
Beginnerconceptual

Why is Python called an interpreted language? Is it purely interpreted?

ReportedSource: GeeksforGeeks interview experience: TCS Ninja + Digital

Quick answer

It runs source without a separate build to machine code; CPython actually compiles to bytecode (.pyc) and the Python VM interprets it. PyPy adds a JIT. Trade-off: portability and flexibility vs speed.

Why it is called interpreted. You run source code directly (python app.py) without a separate compile-and-link step that produces a machine-code executable, and errors such as a NameError appear at runtime when that line runs.

What actually happens in CPython.

  1. The source is compiled to bytecode (.pyc files cached in __pycache__).
  2. The Python Virtual Machine interprets that bytecode instruction by instruction.

So it is "compiled to bytecode, then interpreted", similar in spirit to Java (which adds a JIT compiler by default).

Other implementations. PyPy uses a JIT compiler for large speedups; Cython compiles to C extensions; CPython 3.13 added an experimental JIT.

Consequences to mention. Portability (same bytecode runs on any platform with the interpreter), dynamic typing and flexibility, but slower raw execution than compiled languages for CPU-heavy loops (use NumPy, vectorisation or C extensions).

Discussion