Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions source/specifications/virtual-environments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ are defined:
virtual environment site directories. If ``false``, the system site
directories are not included. It is RECOMMENDED to set it to ``false`` when
creating a virtual environments. The value is not case sensitive.
* ``python-version``: Contains a string value with the major and minor version
of the Python interpreter, such as ``3.16``. The value can be obtained with
``f"{sys.version_info[0]}.{sys.version_info[1]}"``. It omits the patch
version or any other version components. Tools MUST write ``python-version``
to ``pyvenv.cfg`` when creating the virtual environment.


Declaring installation environments as Python virtual environments
Expand All @@ -65,3 +70,4 @@ History
- May 2012: This specification was approved through :pep:`405`.
- Nov 2026: Removed PEP 405 references and clarified that
``include-system-site-packages`` defaults to ``true``.
- Nov 2026: Added ``python-version`` from :pep:`838`.