---
source: https://iinventedlight.com/library/notes/python-sysconfig.md
title: "sysconfig: installation paths and configuration variables"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "PSF License Version 2 (Python Software Foundation); PSF License Version 2 (CPython); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: Python Software Foundation, sysconfig — Provide access to Python’s configuration information; CPython, sysconfig documentation (source). PSF-2.0 (https://docs.python.org/3/license.html). Copyright Python Software Foundation."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-23
status: published
approved_by: "Cole Withington, 2026-11-27 14:30 PT: \"Yes, publish all of that now\""
checked_on: 2026-11-23
as_of: 2026-11-23
confidence: medium
untested: "Not reproduced (2026-11-23). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-python: python-sysconfig"
tags: [python, sysconfig, configuration, paths, stdlib]
client: Librarian
sources:
  - id: S1
    title: "sysconfig — Provide access to Python’s configuration information"
    publisher: Python Software Foundation
    url: https://docs.python.org/3/library/sysconfig.html
    accessed: 2026-11-23
    license: "PSF License Version 2"
  - id: S2
    title: "sysconfig documentation (source)"
    publisher: CPython
    url: https://raw.githubusercontent.com/python/cpython/main/Doc/library/sysconfig.rst
    accessed: 2026-11-23
    license: "PSF License Version 2"
---
# sysconfig: installation paths and configuration variables
**Answer:** sysconfig exposes Python's configuration: installation paths and the variables that apply on the current platform. get_config_vars() returns a dictionary of those variables. get_config_var(name) returns one value, or None if the name is missing.

## Configuration variables

Use sysconfig when you need installation paths or the configuration variables for this platform.

A distribution ships a Makefile and a pyconfig.h header, both needed to build the interpreter and C extensions that use setuptools.

sysconfig puts those variables in a dictionary. Access it using get_config_vars() or get_config_var().

On Windows the set is much smaller.

Called with no arguments, get_config_vars() returns the full dictionary for this platform.

Called with names, it returns a list of looked-up values, one per argument.

get_config_var(name) returns that one value, or None when the name is absent.

## The same facts in the source document

The reStructuredText source describes the same access to paths and platform variables.

get_config_var(name) is written as equivalent to get_config_vars().get(name).

## See also

- [python-platform](https://iinventedlight.com/library/notes/python-platform/)
- [python-os-environ](https://iinventedlight.com/library/notes/python-os-environ/)

## Claims

- id: C1
  claim: sysconfig exposes installation paths and platform configuration variables.
  source: S1
  evidence: "list of installation paths and the configuration variables"

- id: C2
  claim: Variables come from Makefile and pyconfig.h.
  source: S1
  evidence: "Makefile and a pyconfig.h header file"

- id: C3
  claim: get_config_vars() with no arguments returns the full dictionary.
  source: S1
  evidence: "dictionary of all configuration variables"

- id: C4
  claim: get_config_var returns None when the name is missing.
  source: S1
  evidence: "If name is not found, return None"

- id: C5
  claim: get_config_var(name) equals get_config_vars().get(name).
  source: S2
  evidence: "get_config_vars().get(name)"

## Sources

- [S1] sysconfig — Provide access to Python’s configuration information. Python Software Foundation. https://docs.python.org/3/library/sysconfig.html . License: PSF License Version 2. Accessed 2026-11-23.

- [S2] sysconfig documentation (source). CPython. https://raw.githubusercontent.com/python/cpython/main/Doc/library/sysconfig.rst . License: PSF License Version 2. Accessed 2026-11-23.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Python Software Foundation, sysconfig — Provide access to Python’s configuration information; CPython, sysconfig documentation (source). PSF-2.0 (https://docs.python.org/3/license.html). Copyright Python Software Foundation. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
