Skip to content

Commit 84630e2

Browse files
authored
gh-136880: Add warning about PYTHONPATH (GH-151098)
1 parent 871047d commit 84630e2

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Doc/tutorial/venv.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ For example:
8888
'~/envs/tutorial-env/lib/python3.5/site-packages']
8989
>>>
9090
91+
Note that the activated virtual environment does not alter the ``PYTHONPATH`` variable in any way.
92+
This may lead to unexpected results if the path includes references to code which is incompatible with
93+
the Python version the virtual environment is using. The best practice is to ``unset PYTHONPATH``
94+
in bash or the equivalent for the shell you are using.
95+
9196
To deactivate a virtual environment, type::
9297

9398
deactivate

0 commit comments

Comments
 (0)