Created 2022年5月5日12:45
Updated 2022年5月5日12:45
Categories
Python
poetryで作成したプロジェクトにpyside6を入れようとして以下エラー
The current project's Python requirement (>=3.10,<4.0) is not compatible with some of the required packages Python requirement:
- pyside6 requires Python <3.11,>=3.6, so it will not be satisfied for Python >=3.11,<4.0
エラー内容の通り、poetryで指定されているpythonの要求バージョンがライブラリの要求バージョンとあっていないらしい。
pyproject.tomlを見てみると
[tool.poetry.dependencies]
python = "^3.10"
この^
が何かなと思って調べたら、キャレット要件というやつらしい。この指定だとpython3だったらマイナーバージョンはどれでも良いように見える。
エラーを読んでみるとPython >=3.11,<4.0
と言ってるのでpython 3.11以上を要求している…?
もしかするとpoetryが自分で追加したキャレット要件を解釈できていないのかな…?一旦pyside6が要求しているのに書き換えたらうまく動きましたw
[tool.poetry.dependencies]
python = "<3.11,>=3.6"