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

Cannot generate lock file when specifying multiple platform-dependent wheels for a package #5714

Closed
3 tasks done
alasdairtran opened this issue May 29, 2022 · 3 comments · Fixed by #5715
Closed
3 tasks done
Labels
kind/bug Something isn't working as expected

Comments

@alasdairtran
Copy link

  • I am on the latest Poetry version on the master branch.
  • 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: Ubuntu 18.04.6 LTS
  • Poetry version: current master branch
  • Link of a Gist with the contents of your pyproject.toml file: See below

Issue

Here's the pyproject.toml lock file to reproduce the error

[tool.poetry]
name = "test"
version = "0.1.0"
description = ""
authors = []

[tool.poetry.dependencies]
python = "~3.10.4"
jaxlib = [
    {url = "https://storage.googleapis.com/jax-releases/cuda11/jaxlib-0.3.10+cuda11.cudnn82-cp310-none-manylinux2014_x86_64.whl", platform = "linux"},
    {url = "https://storage.googleapis.com/jax-releases/mac/jaxlib-0.3.10-cp310-none-macosx_10_9_x86_64.whl", platform = "darwin" },
]

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.masonry.api"

Using the latest commit from master:

pipx install --suffix=@master 'poetry@git+https://github.com/python-poetry/poetry.git@master'
poetry@master lock

generating the lock file fails with error

  SolverProblemError

  Because test depends on both jaxlib (0.3.10+cuda11.cudnn82 url) and jaxlib (0.3.10 url), version solving failed.

  at ~/.local/pipx/venvs/poetry@master/lib/python3.10/site-packages/poetry/puzzle/solver.py:159 in _solve
      155│             packages = result.packages
      156│         except OverrideNeeded as e:
      157│             return self.solve_in_compatibility_mode(e.overrides, use_latest=use_latest)
      158│         except SolveFailure as e:
    → 159│             raise SolverProblemError(e)
      160│
      161│         combined_nodes = depth_first_search(PackageNode(self._package, packages))
      162│         results = dict(aggregate_package_nodes(nodes) for nodes in combined_nodes)
      163│

I believe the commit that introduces the error is b7acf88 since if we roll back to the commit before that,

pipx install --suffix=@f9e7f 'poetry@git+https://github.com/python-poetry/poetry.git@f9e7f0d1339c2f05443115ab0b55d17176ad077f'
poetry@f9e7f lock

poetry can generate the lock file again.

@alasdairtran alasdairtran added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels May 29, 2022
@radoering
Copy link
Member

As it happens, I was just working on an improvement that should resolve your issue. Can you try #5715?

@alasdairtran
Copy link
Author

Awesome, I just tested and can confirm that #5715 resolves this issue. Didn't expect a fix to come this quickly. Thanks @radoering!

@mkniewallner mkniewallner removed the status/triage This issue needs to be triaged label Jun 11, 2022
Copy link

github-actions bot commented Mar 1, 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 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants