(original) (raw)

changeset: 85562:408b6b3dcf9a parent: 85560:985384cd6365 parent: 85561:ad09332f856f user: Vinay Sajip <vinay_sajip@yahoo.co.uk> date: Fri Sep 06 09:51:27 2013 +0100 files: Doc/library/venv.rst description: Closes #18939: Merged documentation update from 3.3. diff -r 985384cd6365 -r 408b6b3dcf9a Doc/library/venv.rst --- a/Doc/library/venv.rst Fri Sep 06 01🔞36 2013 -0700 +++ b/Doc/library/venv.rst Fri Sep 06 09:51:27 2013 +0100 @@ -21,6 +21,7 @@ creation of environments with various Python versions) and can have its own independent set of installed Python packages in its site directories. +See :pep:`405` for more information about Python virtual environments. Creating virtual environments ----------------------------- @@ -61,6 +62,19 @@ ignored from all distutils configuration files to prevent projects being inadvertently installed outside of the virtual environment. + When working in a command shell, users can make a venv active by running an + ``activate`` script in the venv's executables directory (the precise filename + is shell-dependent), which prepends the venv's directory for executables to + the ``PATH`` environment variable for the running shell. There should be no + need in other circumstances to activate a venv -- scripts installed into + venvs have a shebang line which points to the venv's Python interpreter. This + means that the script will run with that interpreter regardless of the value + of ``PATH``. On Windows, shebang line processing is supported if you have the + Python Launcher for Windows installed (this was added to Python in 3.3 - see + :pep:`397` for more details). Thus, double-clicking an installed script in + a Windows Explorer window should run the script with the correct interpreter + without there needing to be any reference to its venv in ``PATH``. + API --- </vinay_sajip@yahoo.co.uk>