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.

Solver tries to resolve dependencies not required on platform

See original GitHub issue
  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

Issue

I’m trying to remove some unneeded dependencies from my project since they are no longer used (pypiwin32 and pyHook).

However, a dependency (PyUserInput) that is still needed on Linux depends on these two old dependencies, but only on Windows.

Since PyUserInput is only a dependency for Linux (selected with platform = "linux") I shouldn’t need to install these other two dependencies on Windows anymore, yet the solver complains:

[SolverProblemError]
Because no versions of pyuserinput match !=0.1.12
 and pyuserinput (0.1.12) depends on pypiwin32 (*), every version of pyuserinput requires pypiwin32 (*).
So, because no versions of pypiwin32 match *
 and aw-watcher-afk depends on pyuserinput (*), version solving failed.

PR with changes here: https://github.com/ActivityWatch/aw-watcher-afk/pull/39

Failing CI run here: https://github.com/ActivityWatch/aw-watcher-afk/pull/39/checks?check_run_id=564392363

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
abncommented, Apr 19, 2020

@ErikBjare the traceback with -vvv should provide an idea of the codepath.

The relevant block here could be https://github.com/python-poetry/poetry/blob/6e053e5599acdf1e186a8853c6256646c56a4a7d/poetry/puzzle/solver.py#L102-L103

The issue seems to be that poetry is requesting an install operation even if that package is not required. It could also be handled deeper in the Install logic too. Ideally, it should both skip the package and ensure that any unnecessary install/solve operation is not performed during instsall time.

0reactions
finswimmercommented, Oct 21, 2022

Closing this as an upstream issue, as explained by @dimbleby. Please contact the maintainer of this package and ask them to fix it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Video] ActiveState Platform: How To Resolve a Solver Error
The ActiveState Platform attempts to resolve dependencies whenever you add a new package to your environment. If you encounter a Solver ...
Read more >
Maven Could not resolve dependencies, artifacts could not be ...
This error can be reproduced every time I try to build something with maven. Doing mvn dependency:tree, dependency:list, or the usual build ...
Read more >
NuGet Package Dependency Resolution - Microsoft Learn
Note that the packages do not need to be on the same distance for the cousin ... With packages.config , NuGet attempts to...
Read more >
IntelliJ not resolving Maven dependencies
Delete the .idea folder and the .iml files; Delete my maven repository folder; Update the maven repositories indices in IntelliJ; Delete the ...
Read more >
apt - How do I resolve unmet dependencies after adding a PPA?
Since removing the package you are trying to install may not be ideal, you might also try finding a repository that has the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

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