]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-109414: Add some basic information about venvs in the introduction. (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 16 Sep 2023 10:14:07 +0000 (03:14 -0700)
committerGitHub <noreply@github.com>
Sat, 16 Sep 2023 10:14:07 +0000 (11:14 +0100)
(cherry picked from commit a6846d45ff3c836bc859c40e7684b57df991dc05)

Doc/library/venv.rst

index 0b9787d095d9adb61a642e33e7c25fce0d9fbea1..f66e874d09f31d30355a91dd1a90dc9bd9f53bce 100644 (file)
@@ -30,6 +30,25 @@ When used from within a virtual environment, common installation tools such as
 `pip`_ will install Python packages into a virtual environment
 without needing to be told to do so explicitly.
 
+A virtual environment is (amongst other things):
+
+* Used to contain a specific Python interpreter and software libraries and
+  binaries which are needed to support a project (library or application). These
+  are by default isolated from software in other virtual environments and Python
+  interpreters and libraries installed in the operating system.
+
+* Contained in a directory, conventionally either named ``venv`` or ``.venv`` in
+  the project directory, or under a container directory for lots of virtual
+  environments, such as ``~/.virtualenvs``.
+
+* Not checked into source control systems such as Git.
+
+* Considered as disposable -- it should be simple to delete and recreate it from
+  scratch. You don't place any project code in the environment
+
+* Not considered as movable or copyable -- you just recreate the same
+  environment in the target location.
+
 See :pep:`405` for more background on Python virtual environments.
 
 .. seealso::