Skip to content

Commit 69f8de3

Browse files
committed
DOC: add details of use site-packages to sys_path_init docs
1 parent 24666f1 commit 69f8de3

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

Doc/library/sys_path_init.rst

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,19 @@ otherwise they are set to the same value as :data:`sys.base_prefix` and
5757
:data:`sys.base_exec_prefix`, respectively.
5858
This is used by :ref:`sys-path-init-virtual-environments`.
5959

60-
Finally, the :mod:`site` module is processed and :file:`site-packages` directories
61-
are added to the module search path. A common way to customize the search path is
62-
to create :mod:`sitecustomize` or :mod:`usercustomize` modules as described in
63-
the :mod:`site` module documentation.
60+
Finally, the :mod:`site` module is processed and :file:`site-packages`
61+
directories are added to the module search path. The :envvar:`PYTHONUSERBASE`
62+
environment variable controls where is searched for user site-packages and the
63+
:envvar:`PYTHONNOUSERSITE` environment variable prevents searching for user
64+
site-packages all together. A common way to customize the search path is to
65+
create :mod:`sitecustomize` or :mod:`usercustomize` modules as described in the
66+
:mod:`site` module documentation.
6467

6568
.. note::
6669

67-
Certain command line options may further affect path calculations.
68-
See :option:`-E`, :option:`-I`, :option:`-s` and :option:`-S` for further details.
70+
The command line options :option:`-E`, :option:`-P`, :option:`-I`,
71+
:option:`-S` and :option:`-s` further affect path calculations, see their
72+
documentation for details.
6973

7074
.. versionchanged:: 3.14
7175

0 commit comments

Comments
 (0)