Poetry无法安装Scipy(Manjaro Linux,Python 3.10.5)

qyswt5oh  于 2022-11-10  发布在  Linux
关注(0)|答案(1)|浏览(232)

我尝试使用Poetry安装Scipy,但收到以下错误消息:

Using version ^1.9.0 for scipy

  The current project's Python requirement (>=3.10,<4.0) is not compatible with some of the required packages Python requirement:
    - scipy requires Python >=3.8,<3.12, so it will not be satisfied for Python >=3.12,<4.0

  Because scipy (1.9.0) requires Python >=3.8,<3.12
   and no versions of scipy match >1.9.0,<2.0.0, scipy is forbidden.
  So, because assistant depends on scipy (^1.9.0), version solving failed.

  at ~/.local/share/pypoetry/venv/lib/python3.10/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)
eh57zj3b

eh57zj3b1#

我遇到了一个类似的依赖错误,poetry无法安装scipy。我的修复方法是将我的pyproject.toml文件中的Python行从:

python = "^3.10"

python = ">=3.10,<3.12"

我不完全确定为什么这个修复了它,因为它实际上并没有改变它安装的python版本,只是改变了它对约束的看法。

相关问题