question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SolverProblemError with multiple constraints that do not intersect

See original GitHub issue
  • 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: MacOSX
  • Poetry version: 0.12.8
  • Link of a Gist with the contents of your pyproject.toml file: pyproject.toml

Issue

I would like to list pylint as a dependency of my tool. pylint^1 supports Python 2 and pylint^2.0 supports Python 3. From the documentation, I assumed the following would work:

pylint = [
  { version = "^2", python = "^3" },
  { version = "^1", python = "^2" }
]

But I get a SovlerProblemError that says Because phidias depends on both pylint (^2) and pylint (^1), version solving failed.

I have the full output in the Gist. It has the following in it:

   1: fact: phidias depends on pylint (^2)
   1: fact: phidias depends on pylint (^1)

That shouldn’t be true as I can’t be running a Python interpreter that validates both of the Python semantic versions ^2/^3.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
agilgur5commented, Sep 13, 2019

Seems like this may have regressed? On Poetry 0.12.17 (and Python 3.7.4):

pytest = [
    {version = "^5.1", python = "^3.5"},
    {version = "~4.6", python = "~3.4"}
]

The Python versions don’t overlap, but getting this same error:

[SolverProblemError]
Because package-name depends on both pytest (^5.1) and pytest (~4.6), version solving failed.

EDIT: seems like this may only be an issue in dev dependencies now? When I moved it to main dependencies, the SolverProblemError disappeared. Might be worth opening a new issue…

2reactions
agilgur5commented, Oct 27, 2019

@peterdeme and anyone else reading here, looks like a duplicate issue of this was raised in #1480 and later resolved in #1482, which was just released yesterday in 1.0.0b3. Not sure if this will come out in a stable release, but 1.0.0b3 does seem to fix it, as far as I can tell.

Found this out after I wrote a failing test case for this in #1509 only to find out it had a merge conflict and was just recently resolved 😅

Read more comments on GitHub >

github_iconTop Results From Across the Web

SolverProblemError with multiple constraints that do not intersect
If an exception occurs when executing a command, I executed it again in debug mode ( -vvv option). OS version and name: MacOSX;...
Read more >
Why can't I install a Python package with the ... - Stack Overflow
It would make my Poetry project's Python version match the Python requirement of the dependency exactly. I found that if I changed my...
Read more >
A Poetic Apology - Mutt Data Blog
Regarding the second setting, to understand the syntax that specifies the Python version constraints, you should read Poetry versions docs where ...
Read more >
A Review: Pipenv vs. Poetry vs. PDM | Frost's Blog
They both reference to the same range of Python versions to support. Although Pipenv doesn't support a Python version range constraint, I will ......
Read more >
Outdated Pytest Version in Poetry - Yury Zhauniarovich
Problem Recently, I have updated my operating system, and as a part of this process I have installed the latest poetry version (a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found