Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-130160: use.. program:: directive for documentingvenv CLI#130699

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Mr-Sunglasses wants to merge8 commits intopython:main
base:main
Choose a base branch
Loading
fromMr-Sunglasses:venv-use-prog
Open
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 42 additions & 27 deletionsDoc/library/venv.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -63,6 +63,8 @@ See :pep:`405` for more background on Python virtual environments.

Creating virtual environments
-----------------------------
.. _venv-cli:
.. program:: venv

:ref:`Virtual environments <venv-def>` are created by executing the ``venv``
module:
Expand DownExpand Up@@ -105,36 +107,49 @@ The command, if run with ``-h``, will show the available options::

Creates virtual Python environments in one or more target directories.

positional arguments:
ENV_DIR A directory to create the environment in.

options:
-h, --help show this help message and exit
--system-site-packages
Give the virtual environment access to the system
site-packages dir.
--symlinks Try to use symlinks rather than copies, when
symlinks are not the default for the platform.
--copies Try to use copies rather than symlinks, even when
symlinks are the default for the platform.
--clear Delete the contents of the environment directory
if it already exists, before environment creation.
--upgrade Upgrade the environment directory to use this
version of Python, assuming Python has been
upgraded in-place.
--without-pip Skips installing or upgrading pip in the virtual
environment (pip is bootstrapped by default)
--prompt PROMPT Provides an alternative prompt prefix for this
environment.
--upgrade-deps Upgrade core dependencies (pip) to the latest
version in PyPI
--without-scm-ignore-files
Skips adding SCM ignore files to the environment
directory (Git is supported by default).

Once an environment has been created, you may wish to activate it, e.g. by
sourcing an activate script in its bin directory.

.. option:: ENV_DIR

A required argument specifying the directory to create the environment in.

.. option:: --system-site-packages

Give the virtual environment access to the system site-packages directory.

.. option:: --symlinks

Try to use symlinks rather than copies, when symlinks are not the default for the platform.

.. option:: --copies

Try to use copies rather than symlinks, even when symlinks are the default for the platform.

.. option:: --clear

Delete the contents of the environment directory if it already exists, before environment creation.

.. option:: --upgrade

Upgrade the environment directory to use this version of Python, assuming Python has been upgraded in-place.

.. option:: --without-pip

Skips installing or upgrading pip in the virtual environment (pip is bootstrapped by default).

.. option:: --prompt <PROMPT>

Provides an alternative prompt prefix for this environment.

.. option:: --upgrade-deps

Upgrade core dependencies (pip) to the latest version in PyPI.

.. option:: --without-scm-ignore-files

Skips adding SCM ignore files to the environment directory (Git is supported by default).


.. versionchanged:: 3.4
Installs pip by default, added the ``--without-pip`` and ``--copies``
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp