Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dependency resolution bug: kedro range not satisfied despite it actually being satisfied #2444

Closed
3 tasks done
amasad opened this issue May 20, 2020 · 2 comments
Closed
3 tasks done
Labels
area/solver Related to the dependency resolver status/duplicate Duplicate issues

Comments

@amasad
Copy link

amasad commented May 20, 2020

  • 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: Reproducible on macOS 10.13.6 and on Ubuntu 18.04.4 LTS

  • Poetry version: reproducible on 0.12.16 and 0.12.17

  • Link of a Gist with the contents of your pyproject.toml file: this has the full repro: https://repl.it/@amasad/kedro

Issue

Kedro package 0.16 specifies python version to be in the range >=3.6, <3.9 but when you try to install on a project with Python 3.8 it errors out:

Resolving dependencies...
   1: fact: poetrybug is 0.1.0
   1: derived: poetrybug
   1: fact: poetrybug depends on kedro (^0.16.0)
   1: selecting poetrybug (0.1.0)
   1: derived: kedro (^0.16.0)
PyPI: 1 packages found for kedro >=0.16.0,<0.17.0
PyPI: Getting info for kedro (0.16.0) from PyPI
   1: fact: kedro (0.16.0) requires Python >=3.6, <3.9
   1: derived: not kedro (0.16.0)
   1: fact: no versions of kedro match >0.16.0,<0.17.0
   1: conflict: no versions of kedro match >0.16.0,<0.17.0
   1: ! kedro (>0.16.0,<0.17.0) is partially satisfied by not kedro (0.16.0)
   1: ! which is caused by "kedro (0.16.0) requires Python >=3.6, <3.9"
   1: ! thus: kedro is forbidden
   1: ! kedro (>=0.16.0,<0.17.0) is satisfied by kedro (^0.16.0)
   1: ! which is caused by "poetrybug depends on kedro (^0.16.0)"
   1: ! thus: version solving failed
   1: Version solving took 0.240 seconds.
   1: Tried 1 solutions.

I made a full repro here https://repl.it/@amasad/poetrybug

@amasad amasad added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels May 20, 2020
@finswimmer
Copy link
Member

Hello @amasad ,

you are using a very outdated version of poetry. Please update to newest one by running poetry self:update.

With the current release you will see this error message:

Using version ^0.16.1 for kedro

Updating dependencies
Resolving dependencies... (0.6s)

[SolverProblemError]
The current project's Python requirement (^3.8) is not compatible with some of the required packages Python requirement:
  - kedro requires Python >=3.6, <3.9

Because no versions of kedro match >0.16.1,<0.17.0
 and kedro (0.16.1) requires Python >=3.6, <3.9, kedro is forbidden.
So, because poetrybug depends on kedro (^0.16.1), version solving failed.

poetry's version solving is fundamental different to other programs in that way, that it tries to find a major version of a package, that is compatible to all python versions, to which the current project is compatible, and not just the one you are currently using.

So, in your pyproject.tomlyou define a python version ^3.8 which means >=3.8,<4.0. As the error message stated out kedro is only compatible to >=3.6, <3.9. You have to adopt this in your pyproject.toml to be able to install this package.

fin swimmer

@finswimmer finswimmer added status/duplicate Duplicate issues area/solver Related to the dependency resolver and removed kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels May 22, 2020
Copy link

github-actions bot commented Mar 3, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/solver Related to the dependency resolver status/duplicate Duplicate issues
Projects
None yet
Development

No branches or pull requests

2 participants