@@ -775,7 +775,7 @@ archives are built with identical packages.
775
775
Fixing conflicting dependencies
776
776
===============================
777
777
778
- The purpose of this setion of documentation is to provide practical suggestions to
778
+ The purpose of this section of documentation is to provide practical suggestions to
779
779
pip users who encounter an error where pip cannot install their
780
780
specified packages due to conflicting dependencies (a
781
781
``ResolutionImpossible `` error).
@@ -792,6 +792,9 @@ like this:
792
792
::
793
793
794
794
pip install package_coffee==0.44.1 package_tea==4.3.0
795
+
796
+ ::
797
+
795
798
Due to conflicting dependencies pip cannot install package_coffee and
796
799
package_tea:
797
800
- package_coffee depends on package_water<3.0.0,>=2.4.2
@@ -801,11 +804,11 @@ In this example, pip cannot install the packages you have requested,
801
804
because they each depend on different versions of the same package
802
805
(``package_water ``):
803
806
804
- - ``package_coffee `` version ``0.44.1 `` depends on a version of
805
- ``package_water `` that is less than ``3.0.0 `` but greater than or equal to
806
- ``2.4.2 ``
807
- - ``package_tea `` version ``4.3.0 `` depends on version ``2.3.1 `` of
808
- ``package_water ``
807
+ - ``package_coffee `` version ``0.44.1 `` depends on a version of
808
+ ``package_water `` that is less than ``3.0.0 `` but greater than or equal to
809
+ ``2.4.2 ``
810
+ - ``package_tea `` version ``4.3.0 `` depends on version ``2.3.1 `` of
811
+ ``package_water ``
809
812
810
813
Sometimes these messages are straightforward to read, because they use
811
814
commonly understood comparison operators to specify the required version
@@ -814,25 +817,27 @@ commonly understood comparison operators to specify the required version
814
817
However, Python packaging also supports some more complex ways for
815
818
specifying package versions (e.g. ``~= `` or ``* ``):
816
819
817
- +------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
818
- | Operator | Description | Example |
819
- +============+=======================================================================================================================================================================+===============================================================================================================================================================+
820
- | ``> `` | Any version greater than the specified version | **``>3.1``: ** any version greater than ``3.1 `` |
821
- +------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
822
- | ``< `` | Any version less than the specified version | **``<3.1``: ** any version less than ``3.1 `` |
823
- +------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
824
- | ``<= `` | Any version less than or equal to the specified version | **``<=3.1``: ** any version less than or equal to ``3.1 `` |
825
- +------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
826
- | ``>= `` | Any version greater than or equal to the specified version | **``>=3.1``: ** version ``3.1 `` and greater |
827
- +------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
828
- | ``== `` | Exactly the specified version | **``==3.1``: ** only version ``3.1 `` |
829
- +------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
830
- | ``!= `` | Any version not equal to the specified version | **``!=3.1``: ** any version other than ``3.1 `` |
831
- +------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
832
- | ``~= `` | Any compatible release. Compatible releases are releases that are within the same major or minor version, assuming the package author is using semantic versioning. | **``~=3.1``: ** version ``3.1 `` or later, but not version ``4.0 `` or later. **``~=3.1.2``: ** version ``3.1.2 `` or later, but not version ``3.2.0 `` or later. |
833
- +------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
834
- | ``* `` | Can be used at the end of a version number to represent "all" | **``== 3.1.*``: ** any version that starts with ``3.1 ``. Equivalent to ``~=3.1.0 ``. |
835
- +------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
820
+ .. csv-table ::
821
+ :header: "Operator", "Description", "Example"
822
+
823
+ ``> ``, "Any version greater than the specified version", "``>3.1 ``: any
824
+ version greater than 3.1"
825
+ ``< ``, "Any version less than the specified version", "``<3.1 ``: any version
826
+ less than ``3.1 ``"
827
+ ``<= ``, "Any version less than or equal to the specified version", "``<=3.1 ``:
828
+ any version less than or equal to ``3.1 ``",
829
+ ``>= ``, "Any version greater than or equal to the specified
830
+ version", "``>=3.1 ``: version ``3.1 `` and greater"
831
+ ``== ``, "Exactly the specified version", ``==3.1 ``: only version ``3.1 ``
832
+ ``!= ``, "Any version not equal to the specified version", "``!=3.1 ``: any
833
+ version other than ``3.1 ``"
834
+ ``~= ``, "Any compatible release. Compatible releases are releases that are
835
+ within the same major or minor version, assuming the package author is using
836
+ semantic versioning.", "``~=3.1 ``: version ``3.1 `` or later, but not version
837
+ ``4.0 `` or later. ``~=3.1.2 ``: version ``3.1.2 `` or later, but not
838
+ version ``3.2.0 `` or later."
839
+ ``* ``,Can be used at the end of a version number to represent "all", "``== 3.
840
+ 1.* ``: any version that starts with ``3.1 ``. Equivalent to ``~=3.1.0 ``."
836
841
837
842
The detailed specification of supported comparison operators can be
838
843
found in :pep: `440 `.
@@ -884,9 +889,10 @@ specifiers to *only* the more important package::
884
889
885
890
pip install package_coffee==0.44.1b0 package_tea
886
891
887
- This will result in: - ``package_coffee 0.44.1b0 ``, which depends on
888
- ``package_water 2.6.1 `` - ``package_tea 4.1.3 `` which also depends on
889
- ``package_water 2.6.1 ``
892
+ This will result in:
893
+
894
+ - ``package_coffee 0.44.1b0 ``, which depends on ``package_water 2.6.1 ``
895
+ - ``package_tea 4.1.3 `` which also depends on ``package_water 2.6.1 ``
890
896
891
897
Now that you have resolved the issue, you can repin the compatible
892
898
package versions as required.
0 commit comments