@@ -625,7 +625,7 @@ Process-wide parameters
625625 returned string points into static storage; the caller should not modify its
626626 value. This corresponds to the :makevar: `prefix ` variable in the top-level
627627 :file: `Makefile ` and the :option: `--prefix ` argument to the :program: `configure `
628- script at build time. The value is available to Python code as ``sys.prefix ``.
628+ script at build time. The value is available to Python code as ``sys.base_prefix ``.
629629 It is only useful on Unix. See also the next function.
630630
631631 This function should not be called before :c:func: `Py_Initialize `, otherwise
@@ -635,7 +635,8 @@ Process-wide parameters
635635 It now returns ``NULL `` if called before :c:func: `Py_Initialize `.
636636
637637 .. deprecated-removed :: 3.13 3.15
638- Get :data: `sys.prefix ` instead.
638+ Get :data: `sys.base_prefix ` instead, or :data: `sys.prefix ` if
639+ :ref: `virtual environments <venv-def >` need to be handled.
639640
640641
641642.. c :function :: wchar_t * Py_GetExecPrefix ()
@@ -648,7 +649,8 @@ Process-wide parameters
648649 should not modify its value. This corresponds to the :makevar: `exec_prefix `
649650 variable in the top-level :file: `Makefile ` and the ``--exec-prefix ``
650651 argument to the :program: `configure ` script at build time. The value is
651- available to Python code as ``sys.exec_prefix ``. It is only useful on Unix.
652+ available to Python code as ``sys.base_exec_prefix ``. It is only useful on
653+ Unix.
652654
653655 Background: The exec-prefix differs from the prefix when platform dependent
654656 files (such as executables and shared libraries) are installed in a different
@@ -679,7 +681,8 @@ Process-wide parameters
679681 It now returns ``NULL`` if called before :c:func:`Py_Initialize`.
680682
681683 .. deprecated-removed:: 3.13 3.15
682- Get :data:`sys.exec_prefix` instead.
684+ Get :data:`sys.base_exec_prefix` instead, or :data:`sys.exec_prefix` if
685+ :ref:`virtual environments <venv-def>` need to be handled.
683686
684687
685688.. c:function:: wchar_t* Py_GetProgramFullPath()
0 commit comments