@@ -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.
5858This 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
@@ -96,11 +100,10 @@ Please refer to :mod:`site`'s
96100
97101.. note ::
98102
99- There are other ways how "virtual environments" could be implemented, this
100- documentation refers implementations based on the ``pyvenv.cfg `` mechanism,
101- such as :mod: `venv `. Most virtual environment implementations follow the
102- model set by :mod: `venv `, but there may be exotic implementations that
103- diverge from it.
103+ There are other ways "virtual environments" could be implemented.
104+ This documentation refers to implementations based on the ``pyvenv.cfg ``
105+ mechanism, such as :mod: `venv `, that many virtual environment implementations
106+ follow.
104107
105108_pth files
106109----------
0 commit comments