diff options
| author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-10-04 21:48:58 +0300 |
|---|---|---|
| committer | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-10-04 21:48:58 +0300 |
| commit | 65e9c57369af9acb3909057545168f72b7dd5ba5 (patch) | |
| tree | 356a4e1d2366a9269c54affeb6e372f575b685d5 /Doc/using/venv-create.inc | |
| parent | 997adb58191b63d9f12626a1e04770f496a0d9f3 (diff) | |
| download | cpython-git-65e9c57369af9acb3909057545168f72b7dd5ba5.tar.gz | |
Issue #15417: Add support for csh and fish in venv activation scripts.
Diffstat (limited to 'Doc/using/venv-create.inc')
| -rw-r--r-- | Doc/using/venv-create.inc | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/Doc/using/venv-create.inc b/Doc/using/venv-create.inc index 5fdbc9be45..706ac5d6bd 100644 --- a/Doc/using/venv-create.inc +++ b/Doc/using/venv-create.inc @@ -56,20 +56,21 @@ virtualenv will be created, according to the given options, at each provided path. Once a venv has been created, it can be "activated" using a script in the -venv's binary directory. The invocation of the script is platform-specific: on -a Posix platform, you would typically do:: - - $ source <venv>/bin/activate - -whereas on Windows, you might do:: - - C:\> <venv>/Scripts/activate - -if you are using the ``cmd.exe`` shell, or perhaps:: - - PS C:\> <venv>/Scripts/Activate.ps1 - -if you use PowerShell. +venv's binary directory. The invocation of the script is platform-specific: + ++-------------+-----------------+-----------------------------------------+ +| Platform | Shell | Command to activate virtual environment | ++=============+=================+=========================================+ +| Posix | bash/zsh | $ source <venv>/bin/activate | ++-------------+-----------------+-----------------------------------------+ +| | fish | $ . <venv>/bin/activate.fish | ++-------------+-----------------+-----------------------------------------+ +| | csh/tcsh | $ source <venv>/bin/activate.csh | ++-------------+-----------------+-----------------------------------------+ +| Windows | cmd.exe | C:\> <venv>/Scripts/activate.bat | ++-------------+-----------------+-----------------------------------------+ +| | PowerShell | PS C:\> <venv>/Scripts/Activate.ps1 | ++-------------+-----------------+-----------------------------------------+ You don't specifically *need* to activate an environment; activation just prepends the venv's binary directory to your path, so that "python" invokes the |
