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).
- OS version and name: OSX 10.14.5
- Poetry version: 0.12.17
- Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/gusostow/c24ac3d29bb2d8230addebad049f0925
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:
- Created 4 years ago
- Comments:13 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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.
Hi y’all. Like @agoose77, I’ve also encountered the same issue until I’ve called
lock