Runtime and Context Modules

sysconfig

Provides interpreter build configuration and installation path schemes. Use get_paths or get_path for interpreter-specific locations rather than guessing directory layouts. Returned paths describe a scheme, not proof that a directory exists or is writable.

Formal Syntax & Structure

python syntaxpython
import sysconfig

Return Value

module

Module namespace available through import; import is a statement, not a value-returning expression.

Working Example

Example Snippetpython
import sysconfigpaths = sysconfig.get_paths()print("purelib" in paths, "platlib" in paths)
Python Reference