Python Glossary Русский

all Python 3platformfunction

platform.python_compiler()

interpreter

A string naming the compiler used to build the interpreter: 'GCC 13.2.0', 'Clang 17.0.6', 'MSC v.1938 64 bit (AMD64)'.

Syntax

platform.python_compiler()

This is the compiler that built Python itself, not the one currently installed on the system, and building C extensions may need a different one. On Windows the MSC v.19xx string hints at which Visual C++ release matches the interpreter. It is the same text that appears in brackets in sys.version, just on its own.

Examples

import platform, sys
print(platform.python_compiler())  # → ? например GCC 13.2.0
print(platform.python_compiler() in sys.version)  # → True

See also

Open in the full glossarydocs.python.orgReport an inaccuracy