简体   繁体   English

诗歌安装失败 Scipy (Manjaro Linux, Python 3.10.5)

[英]Poetry fails to install Scipy (Manjaro Linux, Python 3.10.5)

I'm trying to install Scipy using Poetry, but I get the following error message:我正在尝试使用 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)

I had a similar dependency error with poetry failing to install scipy.我有一个类似的依赖错误,诗歌无法安装 scipy。 The fix for me was to change the line for Python in my pyproject.toml file from:我的解决方法是在我的pyproject.toml文件中更改 Python 的行:

python = "^3.10"

to

python = ">=3.10,<3.12"

I'm not entirely sure why this fixed it, because it hasn't actually changed the version of python it installed, just how it thinks about the constraints.我不完全确定为什么要修复它,因为它实际上并没有改变它安装的 python 的版本,只是它对约束的看法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM