-
-
Notifications
You must be signed in to change notification settings - Fork 34.5k
DOC: clarify and expand documentation about PYTHONUSERBASE and PYTHONNOUSERSITE #144637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
75f9dac
b4773b3
15ff842
6d4aa9a
1f7db82
9cde670
0f84e9b
d532b81
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,15 +57,19 @@ otherwise they are set to the same value as :data:`sys.base_prefix` and | |
| :data:`sys.base_exec_prefix`, respectively. | ||
| This is used by :ref:`sys-path-init-virtual-environments`. | ||
|
|
||
| Finally, the :mod:`site` module is processed and :file:`site-packages` directories | ||
| are added to the module search path. A common way to customize the search path is | ||
| to create :mod:`sitecustomize` or :mod:`usercustomize` modules as described in | ||
| the :mod:`site` module documentation. | ||
| Finally, the :mod:`site` module is processed and :file:`site-packages` | ||
| directories are added to the module search path. The :envvar:`PYTHONUSERBASE` | ||
| environment variable controls where is searched for user site-packages and the | ||
| :envvar:`PYTHONNOUSERSITE` environment variable prevents searching for user | ||
| site-packages all together. A common way to customize the search path is to | ||
| create :mod:`sitecustomize` or :mod:`usercustomize` modules as described in the | ||
| :mod:`site` module documentation. | ||
|
|
||
| .. note:: | ||
|
|
||
| Certain command line options may further affect path calculations. | ||
| See :option:`-E`, :option:`-I`, :option:`-s` and :option:`-S` for further details. | ||
| The command line options :option:`-E`, :option:`-P`, :option:`-I`, | ||
| :option:`-S` and :option:`-s` further affect path calculations, see their | ||
| documentation for details. | ||
|
|
||
| .. versionchanged:: 3.14 | ||
|
|
||
|
|
@@ -96,11 +100,10 @@ Please refer to :mod:`site`'s | |
|
|
||
| .. note:: | ||
|
|
||
| There are other ways how "virtual environments" could be implemented, this | ||
| documentation refers implementations based on the ``pyvenv.cfg`` mechanism, | ||
| such as :mod:`venv`. Most virtual environment implementations follow the | ||
| model set by :mod:`venv`, but there may be exotic implementations that | ||
| diverge from it. | ||
| There are many ways how "virtual environments" could be implemented. | ||
| This documentation refers to implementations based on the ``pyvenv.cfg`` | ||
| mechanism, such as :mod:`venv`, that many virtual environment implementations | ||
| follow. | ||
|
Comment on lines
-99
to
+106
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I honestly don't think this paragraph needs a change. In fact, I think the new version removes some information that I think is helpful to the user.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do not think this edit removes any factual information, but agree it could be word smithed a bit.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The old text points out that most virtual environment implementations use
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "virtual environments" is a bit of a slippery term as it can both mean the very specific family of implementations that rely on I consider those mainstream tools for the looser meaning the term and in that context the previous text was at best misleading. I tweaked the first sentence a bit. |
||
|
|
||
| _pth files | ||
| ---------- | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.