@@ -1337,7 +1337,7 @@ candidate can take a lot of time. (The amount of time depends on the
1337
1337
package size, the number of versions pip must try, and other concerns.)
1338
1338
1339
1339
How does backtracking work?
1340
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~
1340
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
1341
1341
1342
1342
When doing a pip install, pip starts by making assumptions about the
1343
1343
packages it needs to install. During the install process it needs to check these
@@ -1384,8 +1384,6 @@ version of a package is a good candidate to install. It reduces the risk that
1384
1384
installing a new package will accidentally break an existing installed package,
1385
1385
and so reduces the risk that your environment gets messed up.
1386
1386
1387
- Please address this.
1388
-
1389
1387
What does this behaviour look like?
1390
1388
-----------------------------------
1391
1389
@@ -1439,14 +1437,13 @@ Right now backtracking behaviour looks like this:
1439
1437
Downloading cup-3.13.0-py2.py3-none-any.whl (374 kB)
1440
1438
1441
1439
In the above sample output, pip had to download multiple versions of
1442
- package cup - cup-3.22.0 to cup-3.13.0 - to find a version that will be
1443
- compatible with the other packages - ``spoon ``, ``hot-water ``, ``cup ``
1444
- etc.
1440
+ package ``cup `` - cup-3.22.0 to cup-3.13.0 - to find a version that will be
1441
+ compatible with the other packages - ``spoon ``, ``hot-water ``, etc.
1445
1442
1446
1443
These multiple ``Downloading cup-version `` lines show pip backtracking.
1447
1444
1448
1445
Possible ways to reduce backtracking occurring
1449
- ---------------------------------------------
1446
+ ----------------------------------------------
1450
1447
1451
1448
It's important to mention backtracking behaviour is expected during a
1452
1449
``pip install `` process. What pip is trying to do is complicated - it is
@@ -1459,7 +1456,7 @@ here are a number of ways.
1459
1456
.. _1-allow-pip-to-complete-its-backtracking :
1460
1457
1461
1458
1. Allow pip to complete its backtracking
1462
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1459
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1463
1460
1464
1461
In most cases, pip will complete the backtracking process successfully.
1465
1462
It is possible this could take a very long time to complete - this may
@@ -1474,7 +1471,7 @@ If you'd prefer not to wait, you can interrupt pip (ctrl and c) and use
1474
1471
.. _2-reduce-the-versions-of-the-backtracking-package :
1475
1472
1476
1473
2. Reduce the number of versions pip will try to backtrack through
1477
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1474
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1478
1475
1479
1476
If pip is backtracking more than you'd like, the next option is to
1480
1477
constrain the number of package versions it tries.
@@ -1496,7 +1493,7 @@ can be trial and error.
1496
1493
.. _3-use-constraint-files-or-lockfiles :
1497
1494
1498
1495
3. Use constraint files or lockfiles
1499
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1496
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1500
1497
1501
1498
This option is a progression of 2 above. It requires users to know how
1502
1499
to inspect:
@@ -1518,7 +1515,7 @@ suitable constraints file.
1518
1515
.. _4-be-more-strict-on-package-dependencies-during-development :
1519
1516
1520
1517
4. Be more strict on package dependencies during development
1521
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1518
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1522
1519
1523
1520
For package maintainers during the development, give pip some help by
1524
1521
creating constraint files for the dependency tree. This will reduce the
0 commit comments