pip/docs/html/reference/pip_check.rst

98 lines
1.7 KiB
ReStructuredText
Raw Normal View History

.. _`pip check`:
=========
pip check
=========
.. contents::
2020-02-11 14:05:28 +01:00
Usage
2020-02-11 14:00:03 +01:00
=====
2020-08-06 22:06:10 +02:00
.. tabs::
.. group-tab:: Unix/macOS
.. pip-command-usage:: check "python -m pip"
.. group-tab:: Windows
.. pip-command-usage:: check "py -m pip"
Description
2020-02-11 14:00:03 +01:00
===========
.. pip-command-description:: check
Examples
2020-02-11 14:00:03 +01:00
========
#. If all dependencies are compatible:
.. tabs::
2020-08-06 22:06:10 +02:00
.. group-tab:: Unix/macOS
.. code-block:: console
2020-08-06 22:06:10 +02:00
$ python -m pip check
No broken requirements found.
$ echo $?
0
.. group-tab:: Windows
.. code-block:: console
2020-08-06 22:06:10 +02:00
C:\> py -m pip check
No broken requirements found.
C:\> echo %errorlevel%
0
#. If a package is missing:
.. tabs::
2020-08-06 22:06:10 +02:00
.. group-tab:: Unix/macOS
.. code-block:: console
2020-08-06 22:06:10 +02:00
$ python -m pip check
pyramid 1.5.2 requires WebOb, which is not installed.
$ echo $?
1
.. group-tab:: Windows
.. code-block:: console
2020-08-06 22:06:10 +02:00
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::
2020-08-06 22:06:10 +02:00
.. group-tab:: Unix/macOS
.. code-block:: console
2020-08-06 22:06:10 +02:00
$ 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
.. code-block:: console
2020-08-06 22:06:10 +02:00
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