@@ -63,3 +63,25 @@ Multiple paths can be given to ``pyvenv``, in which case an identical
6363virtualenv will be created, according to the given options, at each
6464provided path.
6565
66+ .. note :: A virtual environment (also called a ``venv``) is a Python
67+ environment such that the Python interpreter, libraries and scripts
68+ installed into it are isolated from those installed in other virtual
69+ environments, and (by default) any libraries installed in a "system" Python,
70+ i.e. one which is installed as part of your operating system.
71+
72+ A venv is a directory tree which contains Python executable files and
73+ other files which indicate that it is a venv.
74+
75+ Common installation tools such as ``distribute `` and ``pip `` work as
76+ expected with venvs - i.e. when a venv is active, they install Python
77+ packages into the venv without needing to be told to do so explicitly.
78+
79+ When a venv is active (i.e. the venv's Python interpreter is running), the
80+ attributes :attr: `sys.prefix ` and :attr: `sys.exec_prefix ` point to the base
81+ directory of the venv, whereas :attr: `sys.base_prefix ` and
82+ :attr: `sys.base_exec_prefix ` point to the non-venv Python installation
83+ which was used to create the venv. If a venv is not active, then
84+ :attr: `sys.prefix ` is the same as :attr: `sys.base_prefix ` and
85+ :attr: `sys.exec_prefix ` is the same as :attr: `sys.base_exec_prefix ` (they
86+ all point to a non-venv Python installation).
87+
0 commit comments