question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Resolver spends too much time calculating "weights" to parents

See original GitHub issue

Description

When running something like pip install -c requirements.txt <package_name> sometimes pip starts checking unnecessary versions.

I know that version checking is unnecessary because requirements.txt contains all the packages with exact versions.

Everything works as expected with legacy resolver.

Expected behaviour

Since all of the versions are already specified, just get them.

pip version

21.2.4

Python version

3.8.8

OS

Ubuntu

How to Reproduce

Unfortunately, I can’t provide a reproducible example since it only happens with a package on internal pip index.

The offending package does have the version specified in requirements.txt and a different version is installed when the command is run.

Output

It says something like:

INFO: pip is looking at multiple versions of kiwisolver to determine which version is compatible with other requirements. This could take a while.

But I already have kiwisolver==1.3.1 in my requirements.txt.

Code of Conduct

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:34 (22 by maintainers)

github_iconTop GitHub Comments

2reactions
pradyunsgcommented, Oct 9, 2021

It’s not the dependency resolution that is slow here – I’ve demonstrated that above. As @uranusjr noted, the problem in this case is the logic that’s computing the “order to install packages” (get_installation_order -> get_topological_weights). That logic is being ridiculously slow, likely due to the very edge-heavy/dense dependency graph that this situation has; and possibly due to a state management bug in that logic.

2reactions
uranusjrcommented, Oct 9, 2021

From the report, resolution time isn’t the actual issue though, it’s after the resolution where we sort packages for installation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Special Cases | 2021-2022 Federal Student Aid Handbook
Entire text of the HEA section on PJ​​ Special circumstances may include: tuition expenses at an elementary or secondary school; medical, dental, ...
Read more >
HOW IS CHILD SUPPORT CALCULATED - California Courts
The guideline calculation takes into account the following: How much money the parents earn or can earn,; How much other income each parent...
Read more >
A guide to parenting arrangements after separation or divorce
If a child spends more than 60% of the time with one parent, the other parent will generally pay child support. A parenting...
Read more >
Body Mass Loss Calculator
This calculator aids in determining how much fluid is needed for each individual athlete during exercise (in regards to how much weight they...
Read more >
Child Visitation | Visitation (Parenting Time) Guidelines - Nolo
If you can't agree on when you and the child should spend time together, ... with the child's parent may help your relationship...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found