fix inconsistent indentation of tab blocks

This commit is contained in:
shireenrao 2020-08-25 07:48:04 -04:00 committed by Srinivas Nyayapati
parent a2e2f5d052
commit 8f3151324f
14 changed files with 481 additions and 477 deletions

View File

@ -34,7 +34,7 @@ extensions = [
'sphinx.ext.extlinks',
'pip_sphinxext',
'sphinx.ext.intersphinx',
'sphinx_tabs.tabs'
'sphinx_tabs.tabs',
]
# intersphinx

View File

@ -30,17 +30,17 @@ have downloaded ``get-pip.py``:
.. tabs::
.. group-tab:: Unix/macOS
.. group-tab:: Unix/macOS
.. code-block:: shell
.. code-block:: shell
python get-pip.py
python get-pip.py
.. group-tab:: Windows
.. group-tab:: Windows
.. code-block:: shell
.. code-block:: shell
py get-pip.py
py get-pip.py
.. warning::
@ -83,66 +83,66 @@ Install from local copies of pip and setuptools:
.. tabs::
.. group-tab:: Unix/macOS
.. group-tab:: Unix/macOS
.. code-block:: shell
.. code-block:: shell
python get-pip.py --no-index --find-links=/local/copies
python get-pip.py --no-index --find-links=/local/copies
.. group-tab:: Windows
.. group-tab:: Windows
.. code-block:: shell
.. code-block:: shell
py get-pip.py --no-index --find-links=/local/copies
py get-pip.py --no-index --find-links=/local/copies
Install to the user site [3]_:
.. tabs::
.. group-tab:: Unix/macOS
.. group-tab:: Unix/macOS
.. code-block:: shell
.. code-block:: shell
python get-pip.py --user
python get-pip.py --user
.. group-tab:: Windows
.. group-tab:: Windows
.. code-block:: shell
.. code-block:: shell
py get-pip.py --user
py get-pip.py --user
Install behind a proxy:
.. tabs::
.. group-tab:: Unix/macOS
.. group-tab:: Unix/macOS
.. code-block:: shell
.. code-block:: shell
python get-pip.py --proxy="http://[user:passwd@]proxy.server:port"
python get-pip.py --proxy="http://[user:passwd@]proxy.server:port"
.. group-tab:: Windows
.. group-tab:: Windows
.. code-block:: shell
.. code-block:: shell
py get-pip.py --proxy="http://[user:passwd@]proxy.server:port"
py get-pip.py --proxy="http://[user:passwd@]proxy.server:port"
``get-pip.py`` can also be used to install a specified combination of ``pip``,
``setuptools``, and ``wheel`` using the same requirements syntax as pip:
.. tabs::
.. group-tab:: Unix/macOS
.. group-tab:: Unix/macOS
.. code-block:: shell
.. code-block:: shell
python get-pip.py pip==9.0.2 wheel==0.30.0 setuptools==28.8.0
python get-pip.py pip==9.0.2 wheel==0.30.0 setuptools==28.8.0
.. group-tab:: Windows
.. group-tab:: Windows
.. code-block:: shell
.. code-block:: shell
py get-pip.py pip==9.0.2 wheel==0.30.0 setuptools==28.8.0
py get-pip.py pip==9.0.2 wheel==0.30.0 setuptools==28.8.0
Using Linux Package Managers
============================
@ -162,13 +162,13 @@ Upgrading pip
.. code-block:: shell
python -m pip install -U pip
python -m pip install -U pip
.. group-tab:: Windows
.. code-block:: shell
py -m pip install -U pip
py -m pip install -U pip
.. _compatibility-requirements:

View File

@ -142,7 +142,7 @@ Uninstall a package:
C:\> py -m pip uninstall SomePackage
Uninstalling SomePackage:
/my/env/lib/pythonx.x/site-packages/somepackage
/my/env/lib/pythonx.x/site-packages/somepackage
Proceed (y/n)? y
Successfully uninstalled SomePackage

View File

@ -234,17 +234,17 @@ included in the command as follows:
.. tabs::
.. group-tab:: Unix/macOS
.. group-tab:: Unix/macOS
.. code-block:: shell
.. code-block:: console
python setup.py <global_options> BUILD COMMAND <build_options>
python setup.py <global_options> BUILD COMMAND <build_options>
.. group-tab:: Windows
.. group-tab:: Windows
.. code-block:: shell
.. code-block:: shell
py setup.py <global_options> BUILD COMMAND <build_options>
py setup.py <global_options> BUILD COMMAND <build_options>
The options are passed unmodified, and presently offer direct access to the
distutils command line. Use of ``--global-option`` and ``--build-option``

View File

@ -32,11 +32,11 @@ Examples
#. If all dependencies are compatible:
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: console
.. code-block:: console
$ python -m pip check
No broken requirements found.
@ -45,7 +45,7 @@ Examples
.. group-tab:: Windows
.. code-block:: console
.. code-block:: console
C:\> py -m pip check
No broken requirements found.
@ -54,11 +54,11 @@ Examples
#. If a package is missing:
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: console
.. code-block:: console
$ python -m pip check
pyramid 1.5.2 requires WebOb, which is not installed.
@ -67,7 +67,7 @@ Examples
.. group-tab:: Windows
.. code-block:: console
.. code-block:: console
C:\> py -m pip check
pyramid 1.5.2 requires WebOb, which is not installed.
@ -76,11 +76,11 @@ Examples
#. If a package has the wrong version:
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: console
.. code-block:: console
$ python -m pip check
pyramid 1.5.2 has requirement WebOb>=1.3.1, but you have WebOb 0.8.
@ -89,7 +89,7 @@ Examples
.. group-tab:: Windows
.. code-block:: console
.. code-block:: console
C:\> py -m pip check
pyramid 1.5.2 has requirement WebOb>=1.3.1, but you have WebOb 0.8.

View File

@ -64,144 +64,148 @@ Examples
#. Download a package and all of its dependencies
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: shell
.. code-block:: shell
python -m pip download SomePackage
python -m pip download -d . SomePackage # equivalent to above
python -m pip download --no-index --find-links=/tmp/wheelhouse -d /tmp/otherwheelhouse SomePackage
python -m pip download SomePackage
python -m pip download -d . SomePackage # equivalent to above
python -m pip download --no-index --find-links=/tmp/wheelhouse -d /tmp/otherwheelhouse SomePackage
.. group-tab:: Windows
.. code-block:: shell
.. code-block:: shell
py -m pip download SomePackage
py -m pip download -d . SomePackage # equivalent to above
py -m pip download --no-index --find-links=/tmp/wheelhouse -d /tmp/otherwheelhouse SomePackage
py -m pip download SomePackage
py -m pip download -d . SomePackage # equivalent to above
py -m pip download --no-index --find-links=/tmp/wheelhouse -d /tmp/otherwheelhouse SomePackage
#. Download a package and all of its dependencies with OSX specific interpreter constraints.
This forces OSX 10.10 or lower compatibility. Since OSX deps are forward compatible,
this will also match ``macosx-10_9_x86_64``, ``macosx-10_8_x86_64``, ``macosx-10_8_intel``,
etc.
It will also match deps with platform ``any``. Also force the interpreter version to ``27``
(or more generic, i.e. ``2``) and implementation to ``cp`` (or more generic, i.e. ``py``).
This forces OSX 10.10 or lower compatibility. Since OSX deps are forward compatible,
this will also match ``macosx-10_9_x86_64``, ``macosx-10_8_x86_64``, ``macosx-10_8_intel``,
etc.
It will also match deps with platform ``any``. Also force the interpreter version to ``27``
(or more generic, i.e. ``2``) and implementation to ``cp`` (or more generic, i.e. ``py``).
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: shell
.. code-block:: shell
python -m pip download \
--only-binary=:all: \
--platform macosx-10_10_x86_64 \
--python-version 27 \
--implementation cp \
SomePackage
python -m pip download \
--only-binary=:all: \
--platform macosx-10_10_x86_64 \
--python-version 27 \
--implementation cp \
SomePackage
.. group-tab:: Windows
.. code-block:: shell
.. code-block:: shell
py -m pip download ^
--only-binary=:all: ^
--platform macosx-10_10_x86_64 ^
--python-version 27 ^
--implementation cp ^
SomePackage
py -m pip download ^
--only-binary=:all: ^
--platform macosx-10_10_x86_64 ^
--python-version 27 ^
--implementation cp ^
SomePackage
#. Download a package and its dependencies with linux specific constraints.
Force the interpreter to be any minor version of py3k, and only accept
``cp34m`` or ``none`` as the abi.
Force the interpreter to be any minor version of py3k, and only accept
``cp34m`` or ``none`` as the abi.
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: shell
.. code-block:: shell
python -m pip download \
--only-binary=:all: \
--platform linux_x86_64 \
--python-version 3 \
--implementation cp \
--abi cp34m \
SomePackage
python -m pip download \
--only-binary=:all: \
--platform linux_x86_64 \
--python-version 3 \
--implementation cp \
--abi cp34m \
SomePackage
.. group-tab:: Windows
.. code-block:: shell
.. code-block:: shell
py -m pip download ^
--only-binary=:all: ^
--platform linux_x86_64 ^
--python-version 3 ^
--implementation cp ^
--abi cp34m ^
SomePackage
py -m pip download ^
--only-binary=:all: ^
--platform linux_x86_64 ^
--python-version 3 ^
--implementation cp ^
--abi cp34m ^
SomePackage
#. Force platform, implementation, and abi agnostic deps.
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: shell
.. code-block:: shell
python -m pip download \
--only-binary=:all: \
--platform any \
--python-version 3 \
--implementation py \
--abi none \
SomePackage
python -m pip download \
--only-binary=:all: \
--platform any \
--python-version 3 \
--implementation py \
--abi none \
SomePackage
.. group-tab:: Windows
.. code-block:: shell
.. code-block:: shell
py -m pip download ^
--only-binary=:all: ^
--platform any ^
--python-version 3 ^
--implementation py ^
--abi none ^
SomePackage
py -m pip download ^
--only-binary=:all: ^
--platform any ^
--python-version 3 ^
--implementation py ^
--abi none ^
SomePackage
#. Even when overconstrained, this will still correctly fetch the pip universal wheel.
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: console
.. code-block:: console
$ python -m pip download \
--only-binary=:all: \
--platform linux_x86_64 \
--python-version 33 \
--implementation cp \
--abi cp34m \
pip>=8
$ python -m pip download \
--only-binary=:all: \
--platform linux_x86_64 \
--python-version 33 \
--implementation cp \
--abi cp34m \
pip>=8
$ ls pip-8.1.1-py2.py3-none-any.whl
pip-8.1.1-py2.py3-none-any.whl
.. code-block:: console
$ ls pip-8.1.1-py2.py3-none-any.whl
pip-8.1.1-py2.py3-none-any.whl
.. group-tab:: Windows
.. code-block:: console
.. code-block:: console
C:\> py -m pip download ^
--only-binary=:all: ^
--platform linux_x86_64 ^
--python-version 33 ^
--implementation cp ^
--abi cp34m ^
pip>=8
C:\> py -m pip download ^
--only-binary=:all: ^
--platform linux_x86_64 ^
--python-version 33 ^
--implementation cp ^
--abi cp34m ^
pip>=8
C:\> dir pip-8.1.1-py2.py3-none-any.whl
pip-8.1.1-py2.py3-none-any.whl
.. code-block:: console
C:\> dir pip-8.1.1-py2.py3-none-any.whl
pip-8.1.1-py2.py3-none-any.whl

View File

@ -39,11 +39,11 @@ Examples
#. Generate output suitable for a requirements file.
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: console
.. code-block:: console
$ python -m pip freeze
docutils==0.11
@ -54,7 +54,7 @@ Examples
.. group-tab:: Windows
.. code-block:: console
.. code-block:: console
C:\> py -m pip freeze
docutils==0.11
@ -66,18 +66,18 @@ Examples
#. Generate a requirements file and then install from it in another environment.
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: shell
.. code-block:: shell
env1/bin/python -m pip freeze > requirements.txt
env2/bin/python -m pip install -r requirements.txt
.. group-tab:: Windows
.. code-block:: shell
.. code-block:: shell
env1\bin\python -m pip freeze > requirements.txt
env2\bin\python -m pip install -r requirements.txt

View File

@ -51,28 +51,28 @@ Compute the hash of a downloaded archive:
.. tabs::
.. group-tab:: Unix/macOS
.. group-tab:: Unix/macOS
.. code-block:: console
.. code-block:: console
$ python -m pip download SomePackage
Collecting SomePackage
Downloading SomePackage-2.2.tar.gz
Saved ./pip_downloads/SomePackage-2.2.tar.gz
Successfully downloaded SomePackage
$ python -m pip hash ./pip_downloads/SomePackage-2.2.tar.gz
./pip_downloads/SomePackage-2.2.tar.gz:
--hash=sha256:93e62e05c7ad3da1a233def6731e8285156701e3419a5fe279017c429ec67ce0
$ python -m pip download SomePackage
Collecting SomePackage
Downloading SomePackage-2.2.tar.gz
Saved ./pip_downloads/SomePackage-2.2.tar.gz
Successfully downloaded SomePackage
$ python -m pip hash ./pip_downloads/SomePackage-2.2.tar.gz
./pip_downloads/SomePackage-2.2.tar.gz:
--hash=sha256:93e62e05c7ad3da1a233def6731e8285156701e3419a5fe279017c429ec67ce0
.. group-tab:: Windows
.. group-tab:: Windows
.. code-block:: console
.. code-block:: console
C:\> py -m pip download SomePackage
Collecting SomePackage
Downloading SomePackage-2.2.tar.gz
Saved ./pip_downloads/SomePackage-2.2.tar.gz
Successfully downloaded SomePackage
C:\> py -m pip hash ./pip_downloads/SomePackage-2.2.tar.gz
./pip_downloads/SomePackage-2.2.tar.gz:
--hash=sha256:93e62e05c7ad3da1a233def6731e8285156701e3419a5fe279017c429ec67ce0
C:\> py -m pip download SomePackage
Collecting SomePackage
Downloading SomePackage-2.2.tar.gz
Saved ./pip_downloads/SomePackage-2.2.tar.gz
Successfully downloaded SomePackage
C:\> py -m pip hash ./pip_downloads/SomePackage-2.2.tar.gz
./pip_downloads/SomePackage-2.2.tar.gz:
--hash=sha256:93e62e05c7ad3da1a233def6731e8285156701e3419a5fe279017c429ec67ce0

View File

@ -106,25 +106,25 @@ which depends on foo:
.. code-block:: console
$ python -m pip install quux
...
Installing collected packages baz, bar, foo, quux
$ python -m pip install quux
...
Installing collected packages baz, bar, foo, quux
$ python -m pip install bar
...
Installing collected packages foo, baz, bar
$ python -m pip install bar
...
Installing collected packages foo, baz, bar
.. group-tab:: Windows
.. code-block:: console
C:\> py -m pip install quux
...
Installing collected packages baz, bar, foo, quux
C:\> py -m pip install quux
...
Installing collected packages baz, bar, foo, quux
C:\> py -m pip install bar
...
Installing collected packages foo, baz, bar
C:\> py -m pip install bar
...
Installing collected packages foo, baz, bar
Prior to v6.1.0, pip made no commitments about install order.
@ -422,13 +422,13 @@ Then, to install from this repository, the syntax would be:
.. code-block:: shell
python -m pip install -e "vcs+protocol://repo_url/#egg=pkg&subdirectory=pkg_dir"
python -m pip install -e "vcs+protocol://repo_url/#egg=pkg&subdirectory=pkg_dir"
.. group-tab:: Windows
.. code-block:: shell
py -m pip install -e "vcs+protocol://repo_url/#egg=pkg&subdirectory=pkg_dir"
py -m pip install -e "vcs+protocol://repo_url/#egg=pkg&subdirectory=pkg_dir"
Git
@ -683,29 +683,29 @@ option:
.. code-block:: console
$ python -m pip install --require-hashes -r requirements.txt
...
Hashes are required in --require-hashes mode (implicitly on when a hash is
specified for any package). These requirements were missing hashes,
leaving them open to tampering. These are the hashes the downloaded
archives actually had. You can add lines like these to your requirements
files to prevent tampering.
pyelasticsearch==1.0 --hash=sha256:44ddfb1225054d7d6b1d02e9338e7d4809be94edbe9929a2ec0807d38df993fa
more-itertools==2.2 --hash=sha256:93e62e05c7ad3da1a233def6731e8285156701e3419a5fe279017c429ec67ce0
$ python -m pip install --require-hashes -r requirements.txt
...
Hashes are required in --require-hashes mode (implicitly on when a hash is
specified for any package). These requirements were missing hashes,
leaving them open to tampering. These are the hashes the downloaded
archives actually had. You can add lines like these to your requirements
files to prevent tampering.
pyelasticsearch==1.0 --hash=sha256:44ddfb1225054d7d6b1d02e9338e7d4809be94edbe9929a2ec0807d38df993fa
more-itertools==2.2 --hash=sha256:93e62e05c7ad3da1a233def6731e8285156701e3419a5fe279017c429ec67ce0
.. group-tab:: Windows
.. code-block:: console
C:\> py -m pip install --require-hashes -r requirements.txt
...
Hashes are required in --require-hashes mode (implicitly on when a hash is
specified for any package). These requirements were missing hashes,
leaving them open to tampering. These are the hashes the downloaded
archives actually had. You can add lines like these to your requirements
files to prevent tampering.
pyelasticsearch==1.0 --hash=sha256:44ddfb1225054d7d6b1d02e9338e7d4809be94edbe9929a2ec0807d38df993fa
more-itertools==2.2 --hash=sha256:93e62e05c7ad3da1a233def6731e8285156701e3419a5fe279017c429ec67ce0
C:\> py -m pip install --require-hashes -r requirements.txt
...
Hashes are required in --require-hashes mode (implicitly on when a hash is
specified for any package). These requirements were missing hashes,
leaving them open to tampering. These are the hashes the downloaded
archives actually had. You can add lines like these to your requirements
files to prevent tampering.
pyelasticsearch==1.0 --hash=sha256:44ddfb1225054d7d6b1d02e9338e7d4809be94edbe9929a2ec0807d38df993fa
more-itertools==2.2 --hash=sha256:93e62e05c7ad3da1a233def6731e8285156701e3419a5fe279017c429ec67ce0
This can be useful in deploy scripts, to ensure that the author of the
@ -756,34 +756,34 @@ Hash-checking mode also works with :ref:`pip download` and :ref:`pip wheel`. A
.. tabs::
.. group-tab:: Unix/macOS
.. group-tab:: Unix/macOS
.. code-block:: shell
.. code-block:: shell
python -m pip install --no-deps -e .
python -m pip install --no-deps -e .
.. group-tab:: Windows
.. group-tab:: Windows
.. code-block:: shell
.. code-block:: shell
py -m pip install --no-deps -e .
py -m pip install --no-deps -e .
Instead of ``python setup.py install``, use...
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: shell
.. code-block:: shell
python -m pip install --no-deps .
python -m pip install --no-deps .
.. group-tab:: Windows
.. code-block:: shell
.. code-block:: shell
py -m pip install --no-deps .
py -m pip install --no-deps .
Hashes from PyPI
^^^^^^^^^^^^^^^^
@ -841,15 +841,15 @@ You can install local projects or VCS projects in "editable" mode:
.. code-block:: shell
python -m pip install -e path/to/SomeProject
python -m pip install -e git+http://repo/my_project.git#egg=SomeProject
python -m pip install -e path/to/SomeProject
python -m pip install -e git+http://repo/my_project.git#egg=SomeProject
.. group-tab:: Windows
.. code-block:: shell
py -m pip install -e path/to/SomeProject
py -m pip install -e git+http://repo/my_project.git#egg=SomeProject
py -m pip install -e path/to/SomeProject
py -m pip install -e git+http://repo/my_project.git#egg=SomeProject
(See the :ref:`VCS Support` section above for more information on VCS-related syntax.)
@ -957,292 +957,292 @@ Examples
#. Install ``SomePackage`` and its dependencies from `PyPI`_ using :ref:`Requirement Specifiers`
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: shell
.. code-block:: shell
python -m pip install SomePackage # latest version
python -m pip install SomePackage==1.0.4 # specific version
python -m pip install 'SomePackage>=1.0.4' # minimum version
python -m pip install SomePackage # latest version
python -m pip install SomePackage==1.0.4 # specific version
python -m pip install 'SomePackage>=1.0.4' # minimum version
.. group-tab:: Windows
.. code-block:: shell
.. code-block:: shell
py -m pip install SomePackage # latest version
py -m pip install SomePackage==1.0.4 # specific version
py -m pip install 'SomePackage>=1.0.4' # minimum version
py -m pip install SomePackage # latest version
py -m pip install SomePackage==1.0.4 # specific version
py -m pip install 'SomePackage>=1.0.4' # minimum version
#. Install a list of requirements specified in a file. See the :ref:`Requirements files <Requirements Files>`.
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: shell
.. code-block:: shell
python -m pip install -r requirements.txt
python -m pip install -r requirements.txt
.. group-tab:: Windows
.. code-block:: shell
.. code-block:: shell
py -m pip install -r requirements.txt
py -m pip install -r requirements.txt
#. Upgrade an already installed ``SomePackage`` to the latest from PyPI.
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: shell
.. code-block:: shell
python -m pip install --upgrade SomePackage
python -m pip install --upgrade SomePackage
.. group-tab:: Windows
.. code-block:: shell
.. code-block:: shell
py -m pip install --upgrade SomePackage
py -m pip install --upgrade SomePackage
#. Install a local project in "editable" mode. See the section on :ref:`Editable Installs <editable-installs>`.
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: shell
.. code-block:: shell
python -m pip install -e . # project in current directory
python -m pip install -e path/to/project # project in another directory
python -m pip install -e . # project in current directory
python -m pip install -e path/to/project # project in another directory
.. group-tab:: Windows
.. code-block:: shell
.. code-block:: shell
py -m pip install -e . # project in current directory
py -m pip install -e path/to/project # project in another directory
py -m pip install -e . # project in current directory
py -m pip install -e path/to/project # project in another directory
#. Install a project from VCS
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: shell
.. code-block:: shell
python -m pip install SomeProject@git+https://git.repo/some_pkg.git@1.3.1
python -m pip install SomeProject@git+https://git.repo/some_pkg.git@1.3.1
.. group-tab:: Windows
.. code-block:: shell
.. code-block:: shell
py -m pip install SomeProject@git+https://git.repo/some_pkg.git@1.3.1
py -m pip install SomeProject@git+https://git.repo/some_pkg.git@1.3.1
#. Install a project from VCS in "editable" mode. See the sections on :ref:`VCS Support <VCS Support>` and :ref:`Editable Installs <editable-installs>`.
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: shell
.. code-block:: shell
python -m pip install -e git+https://git.repo/some_pkg.git#egg=SomePackage # from git
python -m pip install -e hg+https://hg.repo/some_pkg.git#egg=SomePackage # from mercurial
python -m python -m pip install -e svn+svn://svn.repo/some_pkg/trunk/#egg=SomePackage # from svn
python -m pip install -e git+https://git.repo/some_pkg.git@feature#egg=SomePackage # from 'feature' branch
python -m pip install -e "git+https://git.repo/some_repo.git#egg=subdir&subdirectory=subdir_path" # install a python package from a repo subdirectory
python -m pip install -e git+https://git.repo/some_pkg.git#egg=SomePackage # from git
python -m pip install -e hg+https://hg.repo/some_pkg.git#egg=SomePackage # from mercurial
python -m python -m pip install -e svn+svn://svn.repo/some_pkg/trunk/#egg=SomePackage # from svn
python -m pip install -e git+https://git.repo/some_pkg.git@feature#egg=SomePackage # from 'feature' branch
python -m pip install -e "git+https://git.repo/some_repo.git#egg=subdir&subdirectory=subdir_path" # install a python package from a repo subdirectory
.. group-tab:: Windows
.. code-block:: shell
.. code-block:: shell
py -m pip install -e git+https://git.repo/some_pkg.git#egg=SomePackage # from git
py -m pip install -e hg+https://hg.repo/some_pkg.git#egg=SomePackage # from mercurial
py -m pip install -e svn+svn://svn.repo/some_pkg/trunk/#egg=SomePackage # from svn
py -m pip install -e git+https://git.repo/some_pkg.git@feature#egg=SomePackage # from 'feature' branch
py -m pip install -e "git+https://git.repo/some_repo.git#egg=subdir&subdirectory=subdir_path" # install a python package from a repo subdirectory
py -m pip install -e git+https://git.repo/some_pkg.git#egg=SomePackage # from git
py -m pip install -e hg+https://hg.repo/some_pkg.git#egg=SomePackage # from mercurial
py -m pip install -e svn+svn://svn.repo/some_pkg/trunk/#egg=SomePackage # from svn
py -m pip install -e git+https://git.repo/some_pkg.git@feature#egg=SomePackage # from 'feature' branch
py -m pip install -e "git+https://git.repo/some_repo.git#egg=subdir&subdirectory=subdir_path" # install a python package from a repo subdirectory
#. Install a package with `setuptools extras`_.
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: shell
.. code-block:: shell
python -m pip install SomePackage[PDF]
python -m pip install "SomePackage[PDF] @ git+https://git.repo/SomePackage@master#subdirectory=subdir_path"
python -m pip install .[PDF] # project in current directory
python -m pip install SomePackage[PDF]==3.0
python -m pip install SomePackage[PDF,EPUB] # multiple extras
python -m pip install SomePackage[PDF]
python -m pip install "SomePackage[PDF] @ git+https://git.repo/SomePackage@master#subdirectory=subdir_path"
python -m pip install .[PDF] # project in current directory
python -m pip install SomePackage[PDF]==3.0
python -m pip install SomePackage[PDF,EPUB] # multiple extras
.. group-tab:: Windows
.. code-block:: shell
.. code-block:: shell
py -m pip install SomePackage[PDF]
py -m pip install "SomePackage[PDF] @ git+https://git.repo/SomePackage@master#subdirectory=subdir_path"
py -m pip install .[PDF] # project in current directory
py -m pip install SomePackage[PDF]==3.0
py -m pip install SomePackage[PDF,EPUB] # multiple extras
py -m pip install SomePackage[PDF]
py -m pip install "SomePackage[PDF] @ git+https://git.repo/SomePackage@master#subdirectory=subdir_path"
py -m pip install .[PDF] # project in current directory
py -m pip install SomePackage[PDF]==3.0
py -m pip install SomePackage[PDF,EPUB] # multiple extras
#. Install a particular source archive file.
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: shell
.. code-block:: shell
python -m pip install ./downloads/SomePackage-1.0.4.tar.gz
python -m pip install http://my.package.repo/SomePackage-1.0.4.zip
python -m pip install ./downloads/SomePackage-1.0.4.tar.gz
python -m pip install http://my.package.repo/SomePackage-1.0.4.zip
.. group-tab:: Windows
.. code-block:: shell
.. code-block:: shell
py -m pip install ./downloads/SomePackage-1.0.4.tar.gz
py -m pip install http://my.package.repo/SomePackage-1.0.4.zip
py -m pip install ./downloads/SomePackage-1.0.4.tar.gz
py -m pip install http://my.package.repo/SomePackage-1.0.4.zip
#. Install a particular source archive file following :pep:`440` direct references.
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: shell
.. code-block:: shell
python -m pip install SomeProject@http://my.package.repo/SomeProject-1.2.3-py33-none-any.whl
python -m pip install "SomeProject @ http://my.package.repo/SomeProject-1.2.3-py33-none-any.whl"
python -m pip install SomeProject@http://my.package.repo/1.2.3.tar.gz
python -m pip install SomeProject@http://my.package.repo/SomeProject-1.2.3-py33-none-any.whl
python -m pip install "SomeProject @ http://my.package.repo/SomeProject-1.2.3-py33-none-any.whl"
python -m pip install SomeProject@http://my.package.repo/1.2.3.tar.gz
.. group-tab:: Windows
.. code-block:: shell
.. code-block:: shell
py -m pip install SomeProject@http://my.package.repo/SomeProject-1.2.3-py33-none-any.whl
py -m pip install "SomeProject @ http://my.package.repo/SomeProject-1.2.3-py33-none-any.whl"
py -m pip install SomeProject@http://my.package.repo/1.2.3.tar.gz
py -m pip install SomeProject@http://my.package.repo/SomeProject-1.2.3-py33-none-any.whl
py -m pip install "SomeProject @ http://my.package.repo/SomeProject-1.2.3-py33-none-any.whl"
py -m pip install SomeProject@http://my.package.repo/1.2.3.tar.gz
#. Install from alternative package repositories.
Install from a different index, and not `PyPI`_
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: shell
.. code-block:: shell
python -m pip install --index-url http://my.package.repo/simple/ SomePackage
python -m pip install --index-url http://my.package.repo/simple/ SomePackage
.. group-tab:: Windows
.. code-block:: shell
.. code-block:: shell
py -m pip install --index-url http://my.package.repo/simple/ SomePackage
py -m pip install --index-url http://my.package.repo/simple/ SomePackage
Search an additional index during install, in addition to `PyPI`_
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: shell
.. code-block:: shell
python -m pip install --extra-index-url http://my.package.repo/simple SomePackage
python -m pip install --extra-index-url http://my.package.repo/simple SomePackage
.. group-tab:: Windows
.. code-block:: shell
.. code-block:: shell
py -m pip install --extra-index-url http://my.package.repo/simple SomePackage
py -m pip install --extra-index-url http://my.package.repo/simple SomePackage
Install from a local flat directory containing archives (and don't scan indexes):
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: shell
.. code-block:: shell
python -m pip install --no-index --find-links=file:///local/dir/ SomePackage
python -m pip install --no-index --find-links=/local/dir/ SomePackage
python -m pip install --no-index --find-links=relative/dir/ SomePackage
python -m pip install --no-index --find-links=file:///local/dir/ SomePackage
python -m pip install --no-index --find-links=/local/dir/ SomePackage
python -m pip install --no-index --find-links=relative/dir/ SomePackage
.. group-tab:: Windows
.. code-block:: shell
.. code-block:: shell
py -m pip install --no-index --find-links=file:///local/dir/ SomePackage
py -m pip install --no-index --find-links=/local/dir/ SomePackage
py -m pip install --no-index --find-links=relative/dir/ SomePackage
py -m pip install --no-index --find-links=file:///local/dir/ SomePackage
py -m pip install --no-index --find-links=/local/dir/ SomePackage
py -m pip install --no-index --find-links=relative/dir/ SomePackage
#. Find pre-release and development versions, in addition to stable versions. By default, pip only finds stable versions.
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: shell
.. code-block:: shell
python -m pip install --pre SomePackage
python -m pip install --pre SomePackage
.. group-tab:: Windows
.. code-block:: shell
.. code-block:: shell
py -m pip install --pre SomePackage
py -m pip install --pre SomePackage
#. Install packages from source.
Do not use any binary packages
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: shell
.. code-block:: shell
python -m pip install SomePackage1 SomePackage2 --no-binary :all:
python -m pip install SomePackage1 SomePackage2 --no-binary :all:
.. group-tab:: Windows
.. code-block:: shell
.. code-block:: shell
py -m pip install SomePackage1 SomePackage2 --no-binary :all:
py -m pip install SomePackage1 SomePackage2 --no-binary :all:
Specify ``SomePackage1`` to be installed from source:
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: shell
.. code-block:: shell
python -m pip install SomePackage1 SomePackage2 --no-binary SomePackage1
python -m pip install SomePackage1 SomePackage2 --no-binary SomePackage1
.. group-tab:: Windows
.. code-block:: shell
.. code-block:: shell
py -m pip install SomePackage1 SomePackage2 --no-binary SomePackage1
py -m pip install SomePackage1 SomePackage2 --no-binary SomePackage1
----

View File

@ -40,11 +40,11 @@ Examples
#. List installed packages.
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: console
.. code-block:: console
$ python -m pip list
docutils (0.10)
@ -55,7 +55,7 @@ Examples
.. group-tab:: Windows
.. code-block:: console
.. code-block:: console
C:\> py -m pip list
docutils (0.10)
@ -66,11 +66,11 @@ Examples
#. List outdated packages (excluding editables), and the latest version available.
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: console
.. code-block:: console
$ python -m pip list --outdated
docutils (Current: 0.10 Latest: 0.11)
@ -78,7 +78,7 @@ Examples
.. group-tab:: Windows
.. code-block:: console
.. code-block:: console
C:\> py -m pip list --outdated
docutils (Current: 0.10 Latest: 0.11)
@ -87,11 +87,11 @@ Examples
#. List installed packages with column formatting.
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: console
.. code-block:: console
$ python -m pip list --format columns
Package Version
@ -102,7 +102,7 @@ Examples
.. group-tab:: Windows
.. code-block:: console
.. code-block:: console
C:\> py -m pip list --format columns
Package Version
@ -113,11 +113,11 @@ Examples
#. List outdated packages with column formatting.
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: console
.. code-block:: console
$ python -m pip list -o --format columns
Package Version Latest Type
@ -127,7 +127,7 @@ Examples
.. group-tab:: Windows
.. code-block:: console
.. code-block:: console
C:\> py -m pip list -o --format columns
Package Version Latest Type
@ -138,29 +138,29 @@ Examples
#. List packages that are not dependencies of other packages. Can be combined with
other options.
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: console
.. code-block:: console
$ python -m pip list --outdated --not-required
docutils (Current: 0.10 Latest: 0.11)
.. group-tab:: Windows
.. code-block:: console
.. code-block:: console
C:\> py -m pip list --outdated --not-required
docutils (Current: 0.10 Latest: 0.11)
#. Use legacy formatting
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: console
.. code-block:: console
$ python -m pip list --format=legacy
colorama (0.3.7)
@ -170,7 +170,7 @@ Examples
.. group-tab:: Windows
.. code-block:: console
.. code-block:: console
C:\> py -m pip list --format=legacy
colorama (0.3.7)
@ -180,29 +180,29 @@ Examples
#. Use json formatting
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: console
.. code-block:: console
$ python -m pip list --format=json
[{'name': 'colorama', 'version': '0.3.7'}, {'name': 'docopt', 'version': '0.6.2'}, ...
.. group-tab:: Windows
.. code-block:: console
.. code-block:: console
C:\> py -m pip list --format=json
[{'name': 'colorama', 'version': '0.3.7'}, {'name': 'docopt', 'version': '0.6.2'}, ...
#. Use freeze formatting
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: console
.. code-block:: console
$ python -m pip list --format=freeze
colorama==0.3.7
@ -212,7 +212,7 @@ Examples
.. group-tab:: Windows
.. code-block:: console
.. code-block:: console
C:\> py -m pip list --format=freeze
colorama==0.3.7

View File

@ -38,11 +38,11 @@ Examples
#. Search for "peppercorn"
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: console
.. code-block:: console
$ python -m pip search peppercorn
pepperedform - Helpers for using peppercorn with formprocess.
@ -50,7 +50,7 @@ Examples
.. group-tab:: Windows
.. code-block:: console
.. code-block:: console
C:\> py -m pip search peppercorn
pepperedform - Helpers for using peppercorn with formprocess.

View File

@ -38,124 +38,124 @@ Examples
#. Show information about a package:
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: console
.. code-block:: console
$ python -m pip show sphinx
Name: Sphinx
Version: 1.4.5
Summary: Python documentation generator
Home-page: http://sphinx-doc.org/
Author: Georg Brandl
Author-email: georg@python.org
License: BSD
Location: /my/env/lib/python2.7/site-packages
Requires: docutils, snowballstemmer, alabaster, Pygments, imagesize, Jinja2, babel, six
$ python -m pip show sphinx
Name: Sphinx
Version: 1.4.5
Summary: Python documentation generator
Home-page: http://sphinx-doc.org/
Author: Georg Brandl
Author-email: georg@python.org
License: BSD
Location: /my/env/lib/python2.7/site-packages
Requires: docutils, snowballstemmer, alabaster, Pygments, imagesize, Jinja2, babel, six
.. group-tab:: Windows
.. code-block:: console
.. code-block:: console
C:\> py -m pip show sphinx
Name: Sphinx
Version: 1.4.5
Summary: Python documentation generator
Home-page: http://sphinx-doc.org/
Author: Georg Brandl
Author-email: georg@python.org
License: BSD
Location: /my/env/lib/python2.7/site-packages
Requires: docutils, snowballstemmer, alabaster, Pygments, imagesize, Jinja2, babel, six
C:\> py -m pip show sphinx
Name: Sphinx
Version: 1.4.5
Summary: Python documentation generator
Home-page: http://sphinx-doc.org/
Author: Georg Brandl
Author-email: georg@python.org
License: BSD
Location: /my/env/lib/python2.7/site-packages
Requires: docutils, snowballstemmer, alabaster, Pygments, imagesize, Jinja2, babel, six
#. Show all information about a package
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: console
.. code-block:: console
$ python -m pip show --verbose sphinx
Name: Sphinx
Version: 1.4.5
Summary: Python documentation generator
Home-page: http://sphinx-doc.org/
Author: Georg Brandl
Author-email: georg@python.org
License: BSD
Location: /my/env/lib/python2.7/site-packages
Requires: docutils, snowballstemmer, alabaster, Pygments, imagesize, Jinja2, babel, six
Metadata-Version: 2.0
Installer:
Classifiers:
Development Status :: 5 - Production/Stable
Environment :: Console
Environment :: Web Environment
Intended Audience :: Developers
Intended Audience :: Education
License :: OSI Approved :: BSD License
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 3
Framework :: Sphinx
Framework :: Sphinx :: Extension
Framework :: Sphinx :: Theme
Topic :: Documentation
Topic :: Documentation :: Sphinx
Topic :: Text Processing
Topic :: Utilities
Entry-points:
[console_scripts]
sphinx-apidoc = sphinx.apidoc:main
sphinx-autogen = sphinx.ext.autosummary.generate:main
sphinx-build = sphinx:main
sphinx-quickstart = sphinx.quickstart:main
[distutils.commands]
build_sphinx = sphinx.setup_command:BuildDoc
$ python -m pip show --verbose sphinx
Name: Sphinx
Version: 1.4.5
Summary: Python documentation generator
Home-page: http://sphinx-doc.org/
Author: Georg Brandl
Author-email: georg@python.org
License: BSD
Location: /my/env/lib/python2.7/site-packages
Requires: docutils, snowballstemmer, alabaster, Pygments, imagesize, Jinja2, babel, six
Metadata-Version: 2.0
Installer:
Classifiers:
Development Status :: 5 - Production/Stable
Environment :: Console
Environment :: Web Environment
Intended Audience :: Developers
Intended Audience :: Education
License :: OSI Approved :: BSD License
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 3
Framework :: Sphinx
Framework :: Sphinx :: Extension
Framework :: Sphinx :: Theme
Topic :: Documentation
Topic :: Documentation :: Sphinx
Topic :: Text Processing
Topic :: Utilities
Entry-points:
[console_scripts]
sphinx-apidoc = sphinx.apidoc:main
sphinx-autogen = sphinx.ext.autosummary.generate:main
sphinx-build = sphinx:main
sphinx-quickstart = sphinx.quickstart:main
[distutils.commands]
build_sphinx = sphinx.setup_command:BuildDoc
.. group-tab:: Windows
.. code-block:: console
.. code-block:: console
C:\> py -m pip show --verbose sphinx
Name: Sphinx
Version: 1.4.5
Summary: Python documentation generator
Home-page: http://sphinx-doc.org/
Author: Georg Brandl
Author-email: georg@python.org
License: BSD
Location: /my/env/lib/python2.7/site-packages
Requires: docutils, snowballstemmer, alabaster, Pygments, imagesize, Jinja2, babel, six
Metadata-Version: 2.0
Installer:
Classifiers:
Development Status :: 5 - Production/Stable
Environment :: Console
Environment :: Web Environment
Intended Audience :: Developers
Intended Audience :: Education
License :: OSI Approved :: BSD License
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 3
Framework :: Sphinx
Framework :: Sphinx :: Extension
Framework :: Sphinx :: Theme
Topic :: Documentation
Topic :: Documentation :: Sphinx
Topic :: Text Processing
Topic :: Utilities
Entry-points:
[console_scripts]
sphinx-apidoc = sphinx.apidoc:main
sphinx-autogen = sphinx.ext.autosummary.generate:main
sphinx-build = sphinx:main
sphinx-quickstart = sphinx.quickstart:main
[distutils.commands]
build_sphinx = sphinx.setup_command:BuildDoc
C:\> py -m pip show --verbose sphinx
Name: Sphinx
Version: 1.4.5
Summary: Python documentation generator
Home-page: http://sphinx-doc.org/
Author: Georg Brandl
Author-email: georg@python.org
License: BSD
Location: /my/env/lib/python2.7/site-packages
Requires: docutils, snowballstemmer, alabaster, Pygments, imagesize, Jinja2, babel, six
Metadata-Version: 2.0
Installer:
Classifiers:
Development Status :: 5 - Production/Stable
Environment :: Console
Environment :: Web Environment
Intended Audience :: Developers
Intended Audience :: Education
License :: OSI Approved :: BSD License
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 3
Framework :: Sphinx
Framework :: Sphinx :: Extension
Framework :: Sphinx :: Theme
Topic :: Documentation
Topic :: Documentation :: Sphinx
Topic :: Text Processing
Topic :: Utilities
Entry-points:
[console_scripts]
sphinx-apidoc = sphinx.apidoc:main
sphinx-autogen = sphinx.ext.autosummary.generate:main
sphinx-build = sphinx:main
sphinx-quickstart = sphinx.quickstart:main
[distutils.commands]
build_sphinx = sphinx.setup_command:BuildDoc

View File

@ -38,26 +38,26 @@ Examples
#. Uninstall a package.
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: console
.. code-block:: console
$ python -m pip uninstall simplejson
Uninstalling simplejson:
/home/me/env/lib/python2.7/site-packages/simplejson
/home/me/env/lib/python2.7/site-packages/simplejson-2.2.1-py2.7.egg-info
Proceed (y/n)? y
Successfully uninstalled simplejson
$ python -m pip uninstall simplejson
Uninstalling simplejson:
/home/me/env/lib/python2.7/site-packages/simplejson
/home/me/env/lib/python2.7/site-packages/simplejson-2.2.1-py2.7.egg-info
Proceed (y/n)? y
Successfully uninstalled simplejson
.. group-tab:: Windows
.. code-block:: console
.. code-block:: console
C:\> py -m pip uninstall simplejson
Uninstalling simplejson:
/home/me/env/lib/python2.7/site-packages/simplejson
/home/me/env/lib/python2.7/site-packages/simplejson-2.2.1-py2.7.egg-info
Proceed (y/n)? y
Successfully uninstalled simplejson
C:\> py -m pip uninstall simplejson
Uninstalling simplejson:
/home/me/env/lib/python2.7/site-packages/simplejson
/home/me/env/lib/python2.7/site-packages/simplejson-2.2.1-py2.7.egg-info
Proceed (y/n)? y
Successfully uninstalled simplejson

View File

@ -36,17 +36,17 @@ In order for pip to build a wheel, ``setup.py`` must implement the
.. tabs::
.. group-tab:: Unix/macOS
.. group-tab:: Unix/macOS
.. code-block:: shell
.. code-block:: shell
python setup.py bdist_wheel -d TARGET
python setup.py bdist_wheel -d TARGET
.. group-tab:: Windows
.. group-tab:: Windows
.. code-block:: shell
.. code-block:: shell
py setup.py bdist_wheel -d TARGET
py setup.py bdist_wheel -d TARGET
This command must create a wheel compatible with the invoking Python
@ -64,17 +64,17 @@ example:
.. tabs::
.. group-tab:: Unix/macOS
.. group-tab:: Unix/macOS
.. code-block:: shell
.. code-block:: shell
python -m pip wheel --global-option bdist_ext --global-option -DFOO wheel
python -m pip wheel --global-option bdist_ext --global-option -DFOO wheel
.. group-tab:: Windows
.. group-tab:: Windows
.. code-block:: shell
.. code-block:: shell
py -m pip wheel --global-option bdist_ext --global-option -DFOO wheel
py -m pip wheel --global-option bdist_ext --global-option -DFOO wheel
will result in a build command of
@ -103,34 +103,34 @@ Examples
#. Build wheels for a requirement (and all its dependencies), and then install
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: shell
.. code-block:: shell
python -m pip wheel --wheel-dir=/tmp/wheelhouse SomePackage
python -m pip install --no-index --find-links=/tmp/wheelhouse SomePackage
.. group-tab:: Windows
.. code-block:: shell
.. code-block:: shell
py -m pip wheel --wheel-dir=/tmp/wheelhouse SomePackage
py -m pip install --no-index --find-links=/tmp/wheelhouse SomePackage
#. Build a wheel for a package from source
.. tabs::
.. tabs::
.. group-tab:: Unix/macOS
.. code-block:: shell
.. code-block:: shell
python -m pip wheel --no-binary SomePackage SomePackage
.. group-tab:: Windows
.. code-block:: shell
.. code-block:: shell
py -m pip wheel --no-binary SomePackage SomePackage