Browse Source

Switch to sphinx-inline-tabs for tabs

tags/20.3b1
Pradyun Gedam 1 month ago
parent
commit
fb03b6aede
No known key found for this signature in database GPG Key ID: FF99710C4332258E
20 changed files with 1068 additions and 1296 deletions
  1. +1
    -1
      docs/html/conf.py
  2. +12
    -14
      docs/html/development/getting-started.rst
  3. +36
    -48
      docs/html/installing.rst
  4. +78
    -92
      docs/html/quickstart.rst
  5. +12
    -16
      docs/html/reference/pip.rst
  6. +4
    -6
      docs/html/reference/pip_cache.rst
  7. +40
    -48
      docs/html/reference/pip_check.rst
  8. +4
    -6
      docs/html/reference/pip_config.rst
  9. +4
    -6
      docs/html/reference/pip_debug.rst
  10. +90
    -102
      docs/html/reference/pip_download.rst
  11. +28
    -35
      docs/html/reference/pip_freeze.rst
  12. +24
    -28
      docs/html/reference/pip_hash.rst
  13. +210
    -263
      docs/html/reference/pip_install.rst
  14. +104
    -123
      docs/html/reference/pip_list.rst
  15. +14
    -18
      docs/html/reference/pip_search.rst
  16. +113
    -119
      docs/html/reference/pip_show.rst
  17. +20
    -24
      docs/html/reference/pip_uninstall.rst
  18. +30
    -40
      docs/html/reference/pip_wheel.rst
  19. +243
    -306
      docs/html/user_guide.rst
  20. +1
    -1
      tools/requirements/docs.txt

+ 1
- 1
docs/html/conf.py View File

@@ -35,7 +35,7 @@ extensions = [
'sphinx.ext.extlinks',
'sphinx.ext.intersphinx',
# third-party:
'sphinx_tabs.tabs',
'sphinx_inline_tabs',
# in-tree:
'docs_feedback_sphinxext',
'pip_sphinxext',


+ 12
- 14
docs/html/development/getting-started.rst View File

@@ -38,25 +38,23 @@ To run the pip executable from your source tree during development, install pip
locally using editable installation (inside a virtualenv).
You can then invoke your local source tree pip normally.

.. tabs::
.. tab:: Unix/macOS

.. group-tab:: Unix/macOS
.. code-block:: shell

.. code-block:: shell
virtualenv venv # You can also use "python -m venv venv" from python3.3+
source venv/bin/activate
python -m pip install -e .
python -m pip --version

virtualenv venv # You can also use "python -m venv venv" from python3.3+
source venv/bin/activate
python -m pip install -e .
python -m pip --version
.. tab:: Windows

.. group-tab:: Windows
.. code-block:: shell

.. code-block:: shell

virtualenv venv # You can also use "py -m venv venv" from python3.3+
venv\Scripts\activate
py -m pip install -e .
py -m pip --version
virtualenv venv # You can also use "py -m venv venv" from python3.3+
venv\Scripts\activate
py -m pip install -e .
py -m pip --version

Running Tests
=============


+ 36
- 48
docs/html/installing.rst View File

@@ -28,19 +28,17 @@ this link: `get-pip.py
Then run the following command in the folder where you
have downloaded ``get-pip.py``:

.. tabs::
.. tab:: Unix/macOS

.. group-tab:: Unix/macOS
.. code-block:: shell

.. code-block:: shell
python get-pip.py

python get-pip.py
.. tab:: Windows

.. group-tab:: Windows
.. code-block:: shell

.. code-block:: shell

py get-pip.py
py get-pip.py


.. warning::
@@ -81,68 +79,60 @@ some examples:

Install from local copies of pip and setuptools:

.. tabs::

.. group-tab:: Unix/macOS
.. 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
.. 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
.. tab:: Unix/macOS

.. code-block:: shell
.. code-block:: shell

python get-pip.py --user
python get-pip.py --user

.. group-tab:: Windows
.. tab:: Windows

.. code-block:: shell
.. code-block:: shell

py get-pip.py --user
py get-pip.py --user

Install behind a proxy:

.. tabs::
.. 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"
.. 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
.. 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
.. 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
============================
@@ -156,19 +146,17 @@ the `Python Packaging User Guide
Upgrading pip
=============

.. tabs::

.. group-tab:: Unix/macOS
.. tab:: Unix/macOS

.. code-block:: shell
.. code-block:: shell

python -m pip install -U pip
python -m pip install -U pip

.. group-tab:: Windows
.. tab:: Windows

.. code-block:: shell
.. code-block:: shell

py -m pip install -U pip
py -m pip install -U pip


.. _compatibility-requirements:


+ 78
- 92
docs/html/quickstart.rst View File

@@ -6,145 +6,131 @@ First, :doc:`install pip <installing>`.

Install a package from `PyPI`_:

.. tabs::
.. tab:: Unix/macOS

.. group-tab:: Unix/macOS
.. code-block:: console

.. code-block:: console
$ python -m pip install SomePackage
[...]
Successfully installed SomePackage

$ python -m pip install SomePackage
[...]
Successfully installed SomePackage
.. tab:: Windows

.. group-tab:: Windows
.. code-block:: console

.. code-block:: console

C:\> py -m pip install SomePackage
[...]
Successfully installed SomePackage
C:\> py -m pip install SomePackage
[...]
Successfully installed SomePackage


Install a package that's already been downloaded from `PyPI`_ or
obtained from elsewhere. This is useful if the target machine does not have a
network connection:

.. tabs::

.. group-tab:: Unix/macOS

.. code-block:: console
.. tab:: Unix/macOS

$ python -m pip install SomePackage-1.0-py2.py3-none-any.whl
[...]
Successfully installed SomePackage
.. code-block:: console

.. group-tab:: Windows
$ python -m pip install SomePackage-1.0-py2.py3-none-any.whl
[...]
Successfully installed SomePackage

.. code-block:: console
.. tab:: Windows

C:\> py -m pip install SomePackage-1.0-py2.py3-none-any.whl
[...]
Successfully installed SomePackage
.. code-block:: console

C:\> py -m pip install SomePackage-1.0-py2.py3-none-any.whl
[...]
Successfully installed SomePackage

Show what files were installed:

.. tabs::
.. tab:: Unix/macOS

.. group-tab:: Unix/macOS
.. code-block:: console

.. code-block:: console
$ python -m pip show --files SomePackage
Name: SomePackage
Version: 1.0
Location: /my/env/lib/pythonx.x/site-packages
Files:
../somepackage/__init__.py
[...]

$ python -m pip show --files SomePackage
Name: SomePackage
Version: 1.0
Location: /my/env/lib/pythonx.x/site-packages
Files:
../somepackage/__init__.py
[...]
.. tab:: Windows

.. group-tab:: Windows
.. code-block:: console

.. code-block:: console

C:\> py -m pip show --files SomePackage
Name: SomePackage
Version: 1.0
Location: /my/env/lib/pythonx.x/site-packages
Files:
../somepackage/__init__.py
[...]
C:\> py -m pip show --files SomePackage
Name: SomePackage
Version: 1.0
Location: /my/env/lib/pythonx.x/site-packages
Files:
../somepackage/__init__.py
[...]

List what packages are outdated:

.. tabs::

.. group-tab:: Unix/macOS
.. tab:: Unix/macOS

.. code-block:: console
.. code-block:: console

$ python -m pip list --outdated
SomePackage (Current: 1.0 Latest: 2.0)
$ python -m pip list --outdated
SomePackage (Current: 1.0 Latest: 2.0)

.. group-tab:: Windows
.. tab:: Windows

.. code-block:: console
.. code-block:: console

C:\> py -m pip list --outdated
SomePackage (Current: 1.0 Latest: 2.0)
C:\> py -m pip list --outdated
SomePackage (Current: 1.0 Latest: 2.0)

Upgrade a package:

.. tabs::
.. tab:: Unix/macOS

.. group-tab:: Unix/macOS
.. code-block:: console

.. code-block:: console
$ python -m pip install --upgrade SomePackage
[...]
Found existing installation: SomePackage 1.0
Uninstalling SomePackage:
Successfully uninstalled SomePackage
Running setup.py install for SomePackage
Successfully installed SomePackage

$ python -m pip install --upgrade SomePackage
[...]
Found existing installation: SomePackage 1.0
Uninstalling SomePackage:
Successfully uninstalled SomePackage
Running setup.py install for SomePackage
Successfully installed SomePackage
.. tab:: Windows

.. group-tab:: Windows
.. code-block:: console

.. code-block:: console

C:\> py -m pip install --upgrade SomePackage
[...]
Found existing installation: SomePackage 1.0
Uninstalling SomePackage:
Successfully uninstalled SomePackage
Running setup.py install for SomePackage
Successfully installed SomePackage
C:\> py -m pip install --upgrade SomePackage
[...]
Found existing installation: SomePackage 1.0
Uninstalling SomePackage:
Successfully uninstalled SomePackage
Running setup.py install for SomePackage
Successfully installed SomePackage

Uninstall a package:

.. tabs::

.. group-tab:: Unix/macOS
.. tab:: Unix/macOS

.. code-block:: console
.. code-block:: console

$ python -m pip uninstall SomePackage
Uninstalling SomePackage:
/my/env/lib/pythonx.x/site-packages/somepackage
Proceed (y/n)? y
Successfully uninstalled SomePackage
$ python -m pip uninstall SomePackage
Uninstalling SomePackage:
/my/env/lib/pythonx.x/site-packages/somepackage
Proceed (y/n)? y
Successfully uninstalled SomePackage

.. group-tab:: Windows
.. tab:: Windows

.. code-block:: console

C:\> py -m pip uninstall SomePackage
Uninstalling SomePackage:
/my/env/lib/pythonx.x/site-packages/somepackage
Proceed (y/n)? y
Successfully uninstalled SomePackage
.. code-block:: console

C:\> py -m pip uninstall SomePackage
Uninstalling SomePackage:
/my/env/lib/pythonx.x/site-packages/somepackage
Proceed (y/n)? y
Successfully uninstalled SomePackage

.. _PyPI: https://pypi.org/

+ 12
- 16
docs/html/reference/pip.rst View File

@@ -7,19 +7,17 @@ pip
Usage
*****

.. tabs::
.. tab:: Unix/macOS

.. group-tab:: Unix/macOS
.. code-block:: shell

.. code-block:: shell
python -m pip <command> [options]

python -m pip <command> [options]
.. tab:: Windows

.. group-tab:: Windows
.. code-block:: shell

.. code-block:: shell

py -m pip <command> [options]
py -m pip <command> [options]

Description
***********
@@ -232,19 +230,17 @@ and ``pip wheel`` inject additional arguments into the ``setup.py`` command
(``--build-option`` is only available in ``pip wheel``). These arguments are
included in the command as follows:

.. tabs::

.. group-tab:: Unix/macOS
.. tab:: Unix/macOS

.. code-block:: console
.. code-block:: console

python setup.py <global_options> BUILD COMMAND <build_options>
python setup.py <global_options> BUILD COMMAND <build_options>

.. group-tab:: Windows
.. 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``


+ 4
- 6
docs/html/reference/pip_cache.rst View File

@@ -9,15 +9,13 @@ pip cache
Usage
*****

.. tabs::
.. tab:: Unix/macOS

.. group-tab:: Unix/macOS
.. pip-command-usage:: cache "python -m pip"

.. pip-command-usage:: cache "python -m pip"
.. tab:: Windows

.. group-tab:: Windows

.. pip-command-usage:: cache "py -m pip"
.. pip-command-usage:: cache "py -m pip"

Description
***********


+ 40
- 48
docs/html/reference/pip_check.rst View File

@@ -10,15 +10,13 @@ pip check
Usage
=====

.. tabs::
.. tab:: Unix/macOS

.. group-tab:: Unix/macOS
.. pip-command-usage:: check "python -m pip"

.. pip-command-usage:: check "python -m pip"
.. tab:: Windows

.. group-tab:: Windows

.. pip-command-usage:: check "py -m pip"
.. pip-command-usage:: check "py -m pip"


Description
@@ -32,66 +30,60 @@ Examples

#. If all dependencies are compatible:

.. tabs::

.. group-tab:: Unix/macOS
.. tab:: Unix/macOS

.. code-block:: console
.. code-block:: console

$ python -m pip check
No broken requirements found.
$ echo $?
0
$ python -m pip check
No broken requirements found.
$ echo $?
0

.. group-tab:: Windows
.. tab:: Windows

.. code-block:: console
.. code-block:: console

C:\> py -m pip check
No broken requirements found.
C:\> echo %errorlevel%
0
C:\> py -m pip check
No broken requirements found.
C:\> echo %errorlevel%
0

#. If a package is missing:

.. tabs::
.. tab:: Unix/macOS

.. group-tab:: Unix/macOS
.. code-block:: console

.. code-block:: console
$ python -m pip check
pyramid 1.5.2 requires WebOb, which is not installed.
$ echo $?
1

$ python -m pip check
pyramid 1.5.2 requires WebOb, which is not installed.
$ echo $?
1
.. tab:: Windows

.. group-tab:: Windows
.. code-block:: console

.. code-block:: console

C:\> py -m pip check
pyramid 1.5.2 requires WebOb, which is not installed.
C:\> echo %errorlevel%
1
C:\> py -m pip check
pyramid 1.5.2 requires WebOb, which is not installed.
C:\> echo %errorlevel%
1

#. If a package has the wrong version:

.. tabs::

.. group-tab:: Unix/macOS
.. 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.
$ echo $?
1
$ python -m pip check
pyramid 1.5.2 has requirement WebOb>=1.3.1, but you have WebOb 0.8.
$ echo $?
1

.. group-tab:: Windows
.. 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.
C:\> echo %errorlevel%
1
C:\> py -m pip check
pyramid 1.5.2 has requirement WebOb>=1.3.1, but you have WebOb 0.8.
C:\> echo %errorlevel%
1

+ 4
- 6
docs/html/reference/pip_config.rst View File

@@ -11,15 +11,13 @@ pip config
Usage
=====

.. tabs::
.. tab:: Unix/macOS

.. group-tab:: Unix/macOS
.. pip-command-usage:: config "python -m pip"

.. pip-command-usage:: config "python -m pip"
.. tab:: Windows

.. group-tab:: Windows

.. pip-command-usage:: config "py -m pip"
.. pip-command-usage:: config "py -m pip"


Description


+ 4
- 6
docs/html/reference/pip_debug.rst View File

@@ -10,15 +10,13 @@ pip debug
Usage
=====

.. tabs::
.. tab:: Unix/macOS

.. group-tab:: Unix/macOS
.. pip-command-usage:: debug "python -m pip"

.. pip-command-usage:: debug "python -m pip"
.. tab:: Windows

.. group-tab:: Windows

.. pip-command-usage:: debug "py -m pip"
.. pip-command-usage:: debug "py -m pip"


.. warning::


+ 90
- 102
docs/html/reference/pip_download.rst View File

@@ -11,15 +11,13 @@ pip download
Usage
=====

.. tabs::
.. tab:: Unix/macOS

.. group-tab:: Unix/macOS
.. pip-command-usage:: download "python -m pip"

.. pip-command-usage:: download "python -m pip"
.. tab:: Windows

.. group-tab:: Windows

.. pip-command-usage:: download "py -m pip"
.. pip-command-usage:: download "py -m pip"


Description
@@ -64,23 +62,21 @@ Examples

#. Download a package and all of its dependencies

.. tabs::

.. group-tab:: Unix/macOS
.. 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
.. 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.
@@ -90,122 +86,114 @@ Examples
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::

.. group-tab:: Unix/macOS
.. 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
.. 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.

.. tabs::
.. tab:: Unix/macOS

.. 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
.. tab:: Windows

.. 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::

.. group-tab:: Unix/macOS
.. 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
.. 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::

.. group-tab:: Unix/macOS
.. 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

.. code-block:: console
.. code-block:: console

$ ls pip-8.1.1-py2.py3-none-any.whl
pip-8.1.1-py2.py3-none-any.whl
$ ls pip-8.1.1-py2.py3-none-any.whl
pip-8.1.1-py2.py3-none-any.whl

.. group-tab:: Windows
.. 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

.. code-block:: console
.. code-block:: console

C:\> dir pip-8.1.1-py2.py3-none-any.whl
pip-8.1.1-py2.py3-none-any.whl
C:\> dir pip-8.1.1-py2.py3-none-any.whl
pip-8.1.1-py2.py3-none-any.whl

+ 28
- 35
docs/html/reference/pip_freeze.rst View File

@@ -11,15 +11,13 @@ pip freeze
Usage
=====

.. tabs::
.. tab:: Unix/macOS

.. group-tab:: Unix/macOS
.. pip-command-usage:: freeze "python -m pip"

.. pip-command-usage:: freeze "python -m pip"
.. tab:: Windows

.. group-tab:: Windows

.. pip-command-usage:: freeze "py -m pip"
.. pip-command-usage:: freeze "py -m pip"


Description
@@ -39,45 +37,40 @@ Examples

#. Generate output suitable for a requirements file.

.. tabs::

.. group-tab:: Unix/macOS
.. tab:: Unix/macOS

.. code-block:: console
.. code-block:: console

$ python -m pip freeze
docutils==0.11
Jinja2==2.7.2
MarkupSafe==0.19
Pygments==1.6
Sphinx==1.2.2
$ python -m pip freeze
docutils==0.11
Jinja2==2.7.2
MarkupSafe==0.19
Pygments==1.6
Sphinx==1.2.2

.. group-tab:: Windows
.. tab:: Windows

.. code-block:: console

C:\> py -m pip freeze
docutils==0.11
Jinja2==2.7.2
MarkupSafe==0.19
Pygments==1.6
Sphinx==1.2.2
.. code-block:: console

C:\> py -m pip freeze
docutils==0.11
Jinja2==2.7.2
MarkupSafe==0.19
Pygments==1.6
Sphinx==1.2.2

#. Generate a requirements file and then install from it in another environment.

.. tabs::

.. group-tab:: Unix/macOS
.. 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
env1/bin/python -m pip freeze > requirements.txt
env2/bin/python -m pip install -r requirements.txt

.. group-tab:: Windows
.. 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
env1\bin\python -m pip freeze > requirements.txt
env2\bin\python -m pip install -r requirements.txt

+ 24
- 28
docs/html/reference/pip_hash.rst View File

@@ -10,15 +10,13 @@ pip hash
Usage
=====

.. tabs::
.. tab:: Unix/macOS

.. group-tab:: Unix/macOS
.. pip-command-usage:: hash "python -m pip"

.. pip-command-usage:: hash "python -m pip"
.. tab:: Windows

.. group-tab:: Windows

.. pip-command-usage:: hash "py -m pip"
.. pip-command-usage:: hash "py -m pip"


Description
@@ -49,30 +47,28 @@ Example

Compute the hash of a downloaded archive:

.. tabs::

.. group-tab:: Unix/macOS
.. 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
.. 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

+ 210
- 263
docs/html/reference/pip_install.rst View File

@@ -10,15 +10,13 @@ pip install
Usage
=====

.. tabs::
.. tab:: Unix/macOS

.. group-tab:: Unix/macOS
.. pip-command-usage:: install "python -m pip"

.. pip-command-usage:: install "python -m pip"
.. tab:: Windows

.. group-tab:: Windows

.. pip-command-usage:: install "py -m pip"
.. pip-command-usage:: install "py -m pip"



@@ -100,31 +98,29 @@ encountered member of the cycle is installed last.
For instance, if quux depends on foo which depends on bar which depends on baz,
which depends on foo:

.. tabs::

.. group-tab:: Unix/macOS
.. tab:: Unix/macOS

.. code-block:: console
.. 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
.. tab:: Windows

.. code-block:: console
.. 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.
@@ -416,19 +412,17 @@ If your repository layout is::

Then, to install from this repository, the syntax would be:

.. tabs::
.. tab:: Unix/macOS

.. group-tab:: Unix/macOS
.. code-block:: shell

.. 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"
.. tab:: Windows

.. group-tab:: Windows

.. code-block:: shell
.. 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
@@ -677,35 +671,33 @@ against any requirement not only checks that hash but also activates a global
Hash-checking mode can be forced on with the ``--require-hashes`` command-line
option:

.. tabs::
.. tab:: Unix/macOS

.. group-tab:: Unix/macOS
.. code-block:: console

.. 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
.. tab:: Windows

.. group-tab:: Windows
.. code-block:: console

.. 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
@@ -736,54 +728,50 @@ Hash-checking mode also works with :ref:`pip download` and :ref:`pip wheel`. A

.. warning::

Beware of the ``setup_requires`` keyword arg in :file:`setup.py`. The
(rare) packages that use it will cause those dependencies to be downloaded
by setuptools directly, skipping pip's hash-checking. If you need to use
such a package, see :ref:`Controlling
setup_requires<controlling-setup-requires>`.
Beware of the ``setup_requires`` keyword arg in :file:`setup.py`. The
(rare) packages that use it will cause those dependencies to be downloaded
by setuptools directly, skipping pip's hash-checking. If you need to use
such a package, see :ref:`Controlling
setup_requires<controlling-setup-requires>`.

.. warning::

Be careful not to nullify all your security work when you install your
actual project by using setuptools directly: for example, by calling
``python setup.py install``, ``python setup.py develop``, or
``easy_install``. Setuptools will happily go out and download, unchecked,
anything you missed in your requirements file—and it’s easy to miss things
as your project evolves. To be safe, install your project using pip and
:ref:`--no-deps <install_--no-deps>`.

Instead of ``python setup.py develop``, use...
Be careful not to nullify all your security work when you install your
actual project by using setuptools directly: for example, by calling
``python setup.py install``, ``python setup.py develop``, or
``easy_install``. Setuptools will happily go out and download, unchecked,
anything you missed in your requirements file—and it’s easy to miss things
as your project evolves. To be safe, install your project using pip and
:ref:`--no-deps <install_--no-deps>`.

.. tabs::
Instead of ``python setup.py develop``, use...

.. group-tab:: Unix/macOS
.. tab:: Unix/macOS

.. code-block:: shell

python -m pip install --no-deps -e .
.. code-block:: shell

.. group-tab:: Windows
python -m pip install --no-deps -e .

.. code-block:: shell
.. tab:: Windows

py -m pip install --no-deps -e .
.. code-block:: shell

py -m pip install --no-deps -e .

Instead of ``python setup.py install``, use...

.. tabs::
Instead of ``python setup.py install``, use...

.. group-tab:: Unix/macOS
.. tab:: Unix/macOS

.. code-block:: shell
.. code-block:: shell

python -m pip install --no-deps .
python -m pip install --no-deps .

.. group-tab:: Windows
.. tab:: Windows

.. code-block:: shell
.. code-block:: shell

py -m pip install --no-deps .
py -m pip install --no-deps .

Hashes from PyPI
^^^^^^^^^^^^^^^^
@@ -803,20 +791,17 @@ Local project installs
pip supports installing local project in both regular mode and editable mode.
You can install local projects by specifying the project path to pip:

.. tabs::
.. tab:: Unix/macOS

.. group-tab:: Unix/macOS
.. code-block:: shell

.. code-block:: shell
python -m pip install path/to/SomeProject

python -m pip install path/to/SomeProject
.. tab:: Windows

.. group-tab:: Windows

.. code-block:: shell

py -m pip install path/to/SomeProject
.. code-block:: shell

py -m pip install path/to/SomeProject

During regular installation, pip will copy the entire project directory to a
temporary location and install from there. The exception is that pip will
@@ -835,21 +820,19 @@ installs.

You can install local projects or VCS projects in "editable" mode:

.. tabs::
.. tab:: Unix/macOS

.. group-tab:: Unix/macOS
.. code-block:: shell

.. 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
.. tab:: Windows

.. group-tab:: Windows
.. code-block:: shell

.. 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 +940,256 @@ Examples

#. Install ``SomePackage`` and its dependencies from `PyPI`_ using :ref:`Requirement Specifiers`

.. tabs::

.. group-tab:: Unix/macOS
.. 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
.. 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::

.. group-tab:: Unix/macOS
.. 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
.. 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::
.. tab:: Unix/macOS

.. 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
.. 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::

.. group-tab:: Unix/macOS
.. 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
.. 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::
.. tab:: Unix/macOS

.. 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
.. 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::

.. group-tab:: Unix/macOS
.. tab:: Unix/macOS

.. 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
.. code-block:: shell

.. group-tab:: Windows
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

.. code-block:: shell
.. tab:: Windows

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
.. 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

#. Install a package with `setuptools extras`_.

.. tabs::

.. group-tab:: Unix/macOS

.. code-block:: shell
.. tab:: Unix/macOS

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
.. code-block:: shell

.. group-tab:: Windows
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

.. code-block:: shell
.. tab:: Windows

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
.. 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

#. Install a particular source archive file.

.. tabs::

.. group-tab:: Unix/macOS

.. code-block:: shell
.. tab:: Unix/macOS

python -m pip install ./downloads/SomePackage-1.0.4.tar.gz
python -m pip install http://my.package.repo/SomePackage-1.0.4.zip
.. code-block:: shell

.. group-tab:: Windows
python -m pip install ./downloads/SomePackage-1.0.4.tar.gz
python -m pip install http://my.package.repo/SomePackage-1.0.4.zip

.. code-block:: shell
.. tab:: Windows

py -m pip install ./downloads/SomePackage-1.0.4.tar.gz
py -m pip install http://my.package.repo/SomePackage-1.0.4.zip
.. 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

#. Install a particular source archive file following :pep:`440` direct references.

.. tabs::

.. group-tab:: Unix/macOS
.. tab:: Unix/macOS

.. 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
.. code-block:: shell

.. group-tab:: Windows
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

.. code-block:: shell
.. tab:: Windows

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
.. 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

#. Install from alternative package repositories.

Install from a different index, and not `PyPI`_

.. tabs::

.. group-tab:: Unix/macOS
.. tab:: Unix/macOS

.. code-block:: shell

python -m pip install --index-url http://my.package.repo/simple/ SomePackage
.. code-block:: shell

.. group-tab:: Windows
python -m pip install --index-url http://my.package.repo/simple/ SomePackage

.. code-block:: shell
.. tab:: Windows

py -m pip install --index-url http://my.package.repo/simple/ SomePackage
.. code-block:: shell

py -m pip install --index-url http://my.package.repo/simple/ SomePackage

Search an additional index during install, in addition to `PyPI`_

.. tabs::

.. group-tab:: Unix/macOS

.. code-block:: shell
.. tab:: Unix/macOS

python -m pip install --extra-index-url http://my.package.repo/simple SomePackage
.. code-block:: shell

.. group-tab:: Windows
python -m pip install --extra-index-url http://my.package.repo/simple SomePackage

.. code-block:: shell
.. tab:: Windows

py -m pip install --extra-index-url http://my.package.repo/simple SomePackage
.. code-block:: shell

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::
.. tab:: Unix/macOS

.. 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
.. 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::

.. group-tab:: Unix/macOS
.. tab:: Unix/macOS

.. code-block:: shell
.. code-block:: shell

python -m pip install --pre SomePackage
python -m pip install --pre SomePackage

.. group-tab:: Windows
.. 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::
.. tab:: Unix/macOS

.. 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
.. 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::

.. group-tab:: Unix/macOS
.. 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
.. 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

----



+ 104
- 123
docs/html/reference/pip_list.rst View File

@@ -10,15 +10,13 @@ pip list
Usage
=====

.. tabs::
.. tab:: Unix/macOS

.. group-tab:: Unix/macOS
.. pip-command-usage:: list "python -m pip"

.. pip-command-usage:: list "python -m pip"
.. tab:: Windows

.. group-tab:: Windows

.. pip-command-usage:: list "py -m pip"
.. pip-command-usage:: list "py -m pip"


Description
@@ -40,182 +38,165 @@ Examples

#. List installed packages.

.. tabs::

.. group-tab:: Unix/macOS
.. tab:: Unix/macOS

.. code-block:: console
.. code-block:: console

$ python -m pip list
docutils (0.10)
Jinja2 (2.7.2)
MarkupSafe (0.18)
Pygments (1.6)
Sphinx (1.2.1)
$ python -m pip list
docutils (0.10)
Jinja2 (2.7.2)
MarkupSafe (0.18)
Pygments (1.6)
Sphinx (1.2.1)

.. group-tab:: Windows
.. tab:: Windows

.. code-block:: console
.. code-block:: console

C:\> py -m pip list
docutils (0.10)
Jinja2 (2.7.2)
MarkupSafe (0.18)
Pygments (1.6)
Sphinx (1.2.1)
C:\> py -m pip list
docutils (0.10)
Jinja2 (2.7.2)
MarkupSafe (0.18)
Pygments (1.6)
Sphinx (1.2.1)

#. List outdated packages (excluding editables), and the latest version available.

.. tabs::

.. group-tab:: Unix/macOS
.. tab:: Unix/macOS

.. code-block:: console
.. code-block:: console

$ python -m pip list --outdated
docutils (Current: 0.10 Latest: 0.11)
Sphinx (Current: 1.2.1 Latest: 1.2.2)
$ python -m pip list --outdated
docutils (Current: 0.10 Latest: 0.11)
Sphinx (Current: 1.2.1 Latest: 1.2.2)

.. group-tab:: Windows
.. tab:: Windows

.. code-block:: console

C:\> py -m pip list --outdated
docutils (Current: 0.10 Latest: 0.11)
Sphinx (Current: 1.2.1 Latest: 1.2.2)
.. code-block:: console

C:\> py -m pip list --outdated
docutils (Current: 0.10 Latest: 0.11)
Sphinx (Current: 1.2.1 Latest: 1.2.2)

#. List installed packages with column formatting.

.. tabs::

.. group-tab:: Unix/macOS
.. tab:: Unix/macOS

.. code-block:: console
.. code-block:: console

$ python -m pip list --format columns
Package Version
------- -------
docopt 0.6.2
idlex 1.13
jedi 0.9.0
$ python -m pip list --format columns
Package Version
------- -------
docopt 0.6.2
idlex 1.13
jedi 0.9.0

.. group-tab:: Windows
.. tab:: Windows

.. code-block:: console
.. code-block:: console

C:\> py -m pip list --format columns
Package Version
------- -------
docopt 0.6.2
idlex 1.13
jedi 0.9.0
C:\> py -m pip list --format columns
Package Version
------- -------
docopt 0.6.2
idlex 1.13
jedi 0.9.0

#. List outdated packages with column formatting.

.. tabs::
.. tab:: Unix/macOS

.. group-tab:: Unix/macOS
.. code-block:: console

.. code-block:: console
$ python -m pip list -o --format columns
Package Version Latest Type
---------- ------- ------ -----
retry 0.8.1 0.9.1 wheel
setuptools 20.6.7 21.0.0 wheel

$ python -m pip list -o --format columns
Package Version Latest Type
---------- ------- ------ -----
retry 0.8.1 0.9.1 wheel
setuptools 20.6.7 21.0.0 wheel
.. tab:: Windows

.. group-tab:: Windows
.. code-block:: console

.. code-block:: console

C:\> py -m pip list -o --format columns
Package Version Latest Type
---------- ------- ------ -----
retry 0.8.1 0.9.1 wheel
setuptools 20.6.7 21.0.0 wheel
C:\> py -m pip list -o --format columns
Package Version Latest Type
---------- ------- ------ -----
retry 0.8.1 0.9.1 wheel
setuptools 20.6.7 21.0.0 wheel

#. List packages that are not dependencies of other packages. Can be combined with
other options.

.. tabs::

.. group-tab:: Unix/macOS
.. tab:: Unix/macOS

.. code-block:: console
.. code-block:: console

$ python -m pip list --outdated --not-required
docutils (Current: 0.10 Latest: 0.11)
$ python -m pip list --outdated --not-required
docutils (Current: 0.10 Latest: 0.11)

.. group-tab:: Windows
.. tab:: Windows

.. code-block:: console
.. code-block:: console

C:\> py -m pip list --outdated --not-required
docutils (Current: 0.10 Latest: 0.11)
C:\> py -m pip list --outdated --not-required
docutils (Current: 0.10 Latest: 0.11)

#. Use legacy formatting

.. tabs::

.. group-tab:: Unix/macOS
.. tab:: Unix/macOS

.. code-block:: console
.. code-block:: console

$ python -m pip list --format=legacy
colorama (0.3.7)
docopt (0.6.2)
idlex (1.13)
jedi (0.9.0)
$ python -m pip list --format=legacy
colorama (0.3.7)
docopt (0.6.2)
idlex (1.13)
jedi (0.9.0)

.. group-tab:: Windows
.. tab:: Windows

.. code-block:: console
.. code-block:: console

C:\> py -m pip list --format=legacy
colorama (0.3.7)
docopt (0.6.2)
idlex (1.13)
jedi (0.9.0)
C:\> py -m pip list --format=legacy
colorama (0.3.7)