Skip to content

Adding PySide2 fails to resolve version #1930

@madig

Description

@madig
  • I am on the latest Poetry version.
  • 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: Windows 10, Python 3.8.1
  • Poetry version: 1.0.2
  • Link of a Gist with the contents of your pyproject.toml file: See below

Issue

Adding PySide2 as a dependency seems to trigger a resolver bug. See below. python = "^3.8" seems to clash with PySide2's limiter < 3.9. The package can be installed without problems in a 3.8.1 venv (pyside2 5.14.0 only works on Python 3.8.1+ on Windows).

~\AppData\Local\Temp
> poetry new ppp
Created package ppp in ppp
~\AppData\Local\Temp
> cd .\ppp\
~\AppData\Local\Temp\ppp
> cat .\pyproject.toml
[tool.poetry]
name = "ppp"
version = "0.1.0"
description = ""
authors = ["..."]

[tool.poetry.dependencies]
python = "^3.8"

[tool.poetry.dev-dependencies]
pytest = "^5.2"

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
~\AppData\Local\Temp\ppp
> poetry add pyside2=="^5.14"
Creating virtualenv ppp in C:\...\Temp\ppp\.venv

Updating dependencies
Resolving dependencies...

[SolverProblemError]
The current project's Python requirement (^3.8) is not compatible with some of the required packages Python requirement:
  - pyside2 requires Python >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <3.9

Because no versions of pyside2 match >5.14,<6.0
 and pyside2 (5.14.0) requires Python >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <3.9, pyside2 is forbidden.   So, because ppp depends on pyside2 (^5.14), version solving failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/docs/faqFrequently duplicated/potential addition to FAQarea/solverRelated to the dependency resolverkind/bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions