Skip to content

Instantly share code, notes, and snippets.

@badouralix
Created October 4, 2021 22:04
Show Gist options
  • Save badouralix/f769a3f50a65e99fbe27709cffc1fef8 to your computer and use it in GitHub Desktop.
Save badouralix/f769a3f50a65e99fbe27709cffc1fef8 to your computer and use it in GitHub Desktop.
Small example of a dependency problem in python ecosystem
$ poetry install
Updating dependencies
Resolving dependencies... (0.2s)

  SolverProblemError

  Because no versions of black match >21.9b0,<22.0
   and black (21.9b0) depends on typing-extensions (>=3.10.0.0), black (>=21.9b0,<22.0) requires typing-extensions (>=3.10.0.0).
  And because tensorflow (2.6.0) depends on typing-extensions (>=3.7.4,<3.8.0)
   and no versions of tensorflow match >2.6.0,<3.0.0, black (>=21.9b0,<22.0) is incompatible with tensorflow (>=2.6.0,<3.0.0).
  So, because  depends on both tensorflow (^2.6.0) and black (^21.9b0), version solving failed.

  at /usr/local/Cellar/poetry/1.1.10/libexec/lib/python3.9/site-packages/poetry/puzzle/solver.py:241 in _solve
      237│             packages = result.packages
      238│         except OverrideNeeded as e:
      239│             return self.solve_in_compatibility_mode(e.overrides, use_latest=use_latest)
      240│         except SolveFailure as e:
    → 241│             raise SolverProblemError(e)
      242│
      243│         results = dict(
      244│             depth_first_search(
      245│                 PackageNode(self._package, packages), aggregate_package_nodes
[tool.poetry]
name = ""
version = "0.1.0"
description = ""
authors = []
[tool.poetry.dependencies]
python = "^3.9"
tensorflow = "^2.6.0"
[tool.poetry.dev-dependencies]
black = "^21.9b0"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment