diff --git a/Doc/library/venv.rst b/Doc/library/venv.rst --- a/Doc/library/venv.rst +++ b/Doc/library/venv.rst @@ -38,21 +38,19 @@ Creating virtual environments i.e. one which is installed as part of your operating system. A venv is a directory tree which contains Python executable files and other files which indicate that it is a venv. Common installation tools such as ``Setuptools`` and ``pip`` work as expected with venvs - i.e. when a venv is active, they install Python packages into the venv without needing to be told to do so explicitly. - Of course, you need to install them into the venv first: this could be - done by running ``ez_setup.py`` with the venv activated, - followed by running ``easy_install pip``. Alternatively, you could download - the source tarballs and run ``python setup.py install`` after unpacking, - with the venv activated. + Since Python 3.4, they are automatically installed into a new venv. If + you need to upgrade the installed versions of those tools, run + ``python -m ensurepip --upgrade``. When a venv is active (i.e. the venv's Python interpreter is running), the attributes :attr:`sys.prefix` and :attr:`sys.exec_prefix` point to the base directory of the venv, whereas :attr:`sys.base_prefix` and :attr:`sys.base_exec_prefix` point to the non-venv Python installation which was used to create the venv. If a venv is not active, then :attr:`sys.prefix` is the same as :attr:`sys.base_prefix` and :attr:`sys.exec_prefix` is the same as :attr:`sys.base_exec_prefix` (they