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.

Version solving fails for transitive dependencies of another local poetry package

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

My poetry package (db_scripts) depends on another local poetry package (lib) that I created also. In the lib package I was able to install psycopg2-binary = "^2.8.3" just fine, but when I try to install lib in db_scripts I get the exception:

[SolverProblemError]
Because no versions of lib match !=0.1.0
 and lib (0.1.0) depends on psycopg2-binary (^2.8.3), every version of lib requires psycopg2-binary (^2.8.3).
So, because no versions of psycopg2-binary match >=2.8.3,<3.0.0
 and db-scripts depends on lib (*), version solving failed.

Which doesn’t make sense because I was able to install it in the other package via poetry just beforehand. And poetry search psycopg2-binary=2.8.3 comes up with the desired result.

Why can I install a package in a poetry project, but not in another poetry project that depends on the first one? Help is appreciated

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
tupuicommented, Nov 16, 2020

@finswimmer While recreating a lock file solves the issue. The error message is still confusing and could be improved. I need to handcraft my lock files (because we still cannot exclude some deps which would be wrongly set like enum34 and functools32 with python 3.7) and adding another poetry repo led to the same issue.

0reactions
avshyzcommented, May 31, 2020

Hi y’all. Like @agoose77, I’ve also encountered the same issue until I’ve called lock

Read more comments on GitHub >

github_iconTop Results From Across the Web

Poetry takes dependencies restrictions from another project
Trying to create a new project with poetry, but poetry (probably) tries to take dependencies restrictions from another project.
Read more >
Dependency specification | Documentation | Poetry - Python ...
If other dependencies require a different version, the solver will ultimately fail and abort any install or update procedures. Using the @ operator...
Read more >
Implementing dependency management with Python Poetry
Transitive dependencies are packages that your top-level dependencies depend upon, and the packages THEY depend on, and so on. Minor variations ...
Read more >
Dependency management - Synapse - GitHub Pages
Managing dependencies with Poetry. This is a quick cheat sheet for developers on how to use poetry . Background. Synapse uses a variety...
Read more >
Which Python Dependency Manager Should I Choose?
Pinning a package to a specific version can become a management ... However, Poetry's solution to transitive dependencies isn't quite right.
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