From f217cfcfee348906cb0cc8ef5187cf379f425e42 Mon Sep 17 00:00:00 2001 From: Mikhail Ryazanov Date: Fri, 25 Sep 2026 18:09:05 -0600 Subject: [PATCH 1/2] Punctuation and minor style corrections --- source/tutorials/installing-packages.rst | 57 ++++++++++++------------ 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/source/tutorials/installing-packages.rst b/source/tutorials/installing-packages.rst index 4c9b950306..70efb3d8d7 100644 --- a/source/tutorials/installing-packages.rst +++ b/source/tutorials/installing-packages.rst @@ -110,7 +110,7 @@ check this by running: py -m pip --version If you installed Python from source, with an installer from `python.org`_, or -via `Homebrew`_ you should already have pip. If you're on Linux and installed +via `Homebrew`_, you should already have pip. If you're on Linux and installed using your OS package manager, you may have to install pip separately, see :doc:`/guides/installing-using-linux-tools`. @@ -144,9 +144,9 @@ If that still doesn't allow you to run ``python -m pip``: Be cautious if you're using a Python install that's managed by your operating system or another package manager. get-pip.py does not - coordinate with those tools, and may leave your system in an + coordinate with those tools and may leave your system in an inconsistent state. You can use ``python get-pip.py --prefix=/usr/local/`` - to install in ``/usr/local`` which is designed for locally-installed + to install in ``/usr/local`` which is designed for locally installed software. @@ -188,7 +188,7 @@ but here's the basic :doc:`venv ` [3]_ command to use on a py -m venv tutorial_env tutorial_env\Scripts\activate -This will create a new virtual environment in the ``tutorial_env`` subdirectory, +This will create a new virtual environment in the ``tutorial_env`` subdirectory and configure the current shell to use it as the default ``python`` environment. @@ -200,7 +200,7 @@ Creating Virtual Environments Python "Virtual Environments" allow Python :term:`packages ` to be installed in an isolated location for a particular application, rather than being installed globally. If you are looking to safely install -global command line tools, +global command-line tools, see :doc:`/guides/installing-stand-alone-command-line-tools`. Imagine you have an application that needs version 1 of LibFoo, but another @@ -217,7 +217,7 @@ Also, what if you can’t install :term:`packages ` into t global site-packages directory? For instance, on a shared host. In all these cases, virtual environments can help you. They have their own -installation directories and they don’t share libraries with other virtual +installation directories and don’t share libraries with other virtual environments. Currently, there are two common tools for creating Python virtual environments: @@ -284,7 +284,7 @@ script directly from the command shell like so: Managing multiple virtual environments directly can become tedious, so the :ref:`dependency management tutorial ` introduces a -higher level tool, :ref:`Pipenv`, that automatically manages a separate +higher-level tool :ref:`Pipenv` that automatically manages a separate virtual environment for each project and application that you work on. @@ -375,7 +375,7 @@ Source Distributions vs Wheels :ref:`pip` can install from either :term:`Source Distributions (sdist) ` or :term:`Wheels `, but if both are present on PyPI, pip will prefer a compatible :term:`wheel `. You can override -pip`s default behavior by e.g. using its :ref:`--no-binary +pip's default behavior by e.g. using its :ref:`--no-binary ` option. :term:`Wheels ` are a pre-built :term:`distribution `_ section from the pip docs. Note that the ``--user`` flag has no effect when inside a virtual environment -- all installation commands will affect the virtual environment. +– all installation commands will affect the virtual environment. If ``SomeProject`` defines any command-line scripts or console entry points, ``--user`` will cause them to be installed inside the `user base`_'s binary @@ -443,13 +443,13 @@ directory to your :envvar:`PATH`: - On Linux and macOS you can find the user base binary directory by running ``python -m site --user-base`` and adding ``bin`` to the end. For example, this will typically print ``~/.local`` (with ``~`` expanded to the absolute - path to your home directory) so you'll need to add ``~/.local/bin`` to your + path to your home directory), so you'll need to add ``~/.local/bin`` to your ``PATH``. You can set your ``PATH`` permanently by `modifying ~/.profile`_. - On Windows you can find the user base binary directory by running ``py -m site --user-site`` and replacing ``site-packages`` with ``Scripts``. For example, this could return - ``C:\Users\Username\AppData\Roaming\Python36\site-packages`` so you would + ``C:\Users\Username\AppData\Roaming\Python36\site-packages``, so you would need to set your ``PATH`` to include ``C:\Users\Username\AppData\Roaming\Python36\Scripts``. You can set your user ``PATH`` permanently in the `Control Panel`_. You may need to log out for the @@ -463,7 +463,7 @@ Requirements files ================== Install a list of requirements specified in a :ref:`Requirements File -`. +`: .. tab:: Unix/macOS @@ -480,8 +480,7 @@ Install a list of requirements specified in a :ref:`Requirements File Installing from VCS =================== -Install a project from VCS in "editable" mode. For a full breakdown of the -syntax, see pip's section on :ref:`VCS Support `. +Install a project from VCS in "editable" mode: .. tab:: Unix/macOS @@ -501,10 +500,12 @@ syntax, see pip's section on :ref:`VCS Support `. py -m pip install -e SomeProject @ svn+svn://svn.repo/some_pkg/trunk/ # from svn py -m pip install -e SomeProject @ git+https://git.repo/some_pkg.git@feature # from a branch +For a full breakdown of the syntax, see pip's section on :ref:`VCS Support `. + Installing from other Indexes ============================= -Install from an alternate index +Install from an alternate index: .. tab:: Unix/macOS @@ -519,7 +520,7 @@ Install from an alternate index py -m pip install --index-url http://my.package.repo/simple/ SomeProject Search an additional index during install, in addition to :term:`PyPI ` +Package Index (PyPI)>`: .. tab:: Unix/macOS @@ -540,7 +541,7 @@ Installing from a local src tree Installing from local src in :doc:`Development Mode `, i.e. in such a way that the project appears to be installed, but yet is -still editable from the src tree. +still editable from the src tree: .. tab:: Unix/macOS @@ -554,7 +555,7 @@ still editable from the src tree. py -m pip install -e -You can also install normally from src +You can also install normally from src: .. tab:: Unix/macOS @@ -571,7 +572,7 @@ You can also install normally from src Installing from local archives ============================== -Install a particular source archive file. +Install a particular source archive file: .. tab:: Unix/macOS @@ -586,7 +587,7 @@ Install a particular source archive file. py -m pip install ./downloads/SomeProject-1.0.4.tar.gz Install from a local directory containing archives (and don't check :term:`PyPI -`) +`): .. tab:: Unix/macOS @@ -607,10 +608,10 @@ Install from a local directory containing archives (and don't check :term:`PyPI Installing from other sources ============================= -To install from other data sources (for example Amazon S3 storage) +To install from other data sources (for example, Amazon S3 storage), you can create a helper application that presents the data -in a format compliant with the :ref:`simple repository API `:, -and use the ``--extra-index-url`` flag to direct pip to use that index. +in a format compliant with the :ref:`simple repository API ` +and use the ``--extra-index-url`` flag to direct pip to use that index: .. code-block:: bash @@ -621,8 +622,8 @@ and use the ``--extra-index-url`` flag to direct pip to use that index. Installing Prereleases ====================== -Find pre-release and development versions, in addition to stable versions. By -default, pip only finds stable versions. +Find pre-release and development versions, in addition to stable versions (by +default, pip only finds stable versions): .. tab:: Unix/macOS @@ -678,4 +679,4 @@ you know publishes one, you can include it in the pip installation command: .. [4] The compatible release specifier was accepted in :pep:`440` and support was released in :ref:`setuptools` v8.0 and - :ref:`pip` v6.0 + :ref:`pip` v6.0. From e23dea401f4af068ec6d27abb890adc2438b7ee6 Mon Sep 17 00:00:00 2001 From: Mikhail Ryazanov Date: Mon, 28 Sep 2026 13:56:00 -0600 Subject: [PATCH 2/2] Rearrange for clarify Rephrase the introduction of Pipenv for clarity. --- source/tutorials/installing-packages.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/tutorials/installing-packages.rst b/source/tutorials/installing-packages.rst index 70efb3d8d7..ef17cc1004 100644 --- a/source/tutorials/installing-packages.rst +++ b/source/tutorials/installing-packages.rst @@ -281,10 +281,9 @@ script directly from the command shell like so: \Scripts\activate - Managing multiple virtual environments directly can become tedious, so the -:ref:`dependency management tutorial ` introduces a -higher-level tool :ref:`Pipenv` that automatically manages a separate +:ref:`dependency management tutorial ` introduces +:ref:`Pipenv`, a higher-level tool that automatically manages a separate virtual environment for each project and application that you work on.