Skip to content

Commit 8628b43

Browse files
committed
Add warning about PYTHONPATH
See conversation here: #136880 for the request for this documentation update.
1 parent 5c13217 commit 8628b43

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Doc/tutorial/venv.rst

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

9395
deactivate

0 commit comments

Comments
 (0)