Skip to content

Commit 0931936

Browse files
committed
gh-124113: Clarify venv target directory reuse
1 parent f4f1020 commit 0931936

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Doc/library/venv.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ containing a copy or symlink of the Python executable
7777
It also creates a :file:`lib/pythonX.Y/site-packages` subdirectory
7878
(on Windows, this is :file:`Lib\\site-packages`).
7979
If an existing directory is specified, it will be re-used.
80+
This does not leave the directory unchanged: ``venv`` creates or replaces
81+
environment files in the target directory. Use a dedicated directory for the
82+
virtual environment, and avoid placing project files in it.
8083

8184
.. versionchanged:: 3.5
8285
The use of ``venv`` is now recommended for creating virtual environments.
@@ -126,7 +129,8 @@ The command, if run with ``-h``, will show the available options::
126129

127130
.. option:: --clear
128131

129-
Delete the contents of the environment directory if it already exists, before environment creation.
132+
Delete all contents of the environment directory if it already exists,
133+
before environment creation.
130134

131135
.. option:: --upgrade
132136

0 commit comments

Comments
 (0)