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 papermill

See original GitHub issue

Information

  • 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: Ubuntu 18 LTS

  • Poetry version: 1.0.10 (and 1.0.5, too)

  • Link of a Gist with the contents of your pyproject.toml file: Not required

Issue

When installing papermill with poetry i got the following error message:

[SolverProblemError]
Because no versions of papermill match >2.1.2,<3.0.0
 and papermill (2.1.2) depends on black (*), papermill (>=2.1.2,<3.0.0) requires black (*).
So, because no versions of black match *
 and **myframework** on papermill (^2.1.2), version solving failed.

It looks like it failed to find any version of black, which is weird.

workaround

I just installed black by hand and papermill after that with:

poetry add black
poetry add papermill

This resolved my issue but I leave it here for the poetry devs and other users running into this issue

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
abncommented, Aug 17, 2020

The root cause here is that when provided black (*) as a dependency; since black only has pre-release versions, no version was detected when resolving for dependencies of paparmill. I have attempted to fix it by modifying currrent behaviour such that such packages fallback to returning pre-release versions if constraint is (*). Alternative fix might be in poetry-core where a dependency that uses an any constraint is enabled to allow pre-release. The latter might have undesired side-effects.

1reaction
abncommented, Aug 17, 2020

Thanks for that. I can reproduce the issue now using:

poetry add --dry-run papermill

I was installing black before papermill; missed the part you said about it being the workaround 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

poetry install | SolverProblemError Because my_project ...
The problem with your current pyproject.toml is, that you declare built-in packages as dependencies, like os, pathlib, string and others. This ...
Read more >
Troubleshooting - papermill 2.4.0 documentation
NoSuchKernel Errors can appear when running papermill on jupyter notebooks whose kernel has been specified via conda (nb_conda). nb_conda is used to easily ......
Read more >
[FIXED] Cannot install the gpu version of torch and torchvision ...
SolverProblemError Because torchvision (0.9.0) depends on torch (1.8.0) and mdwithpriorenergy depends on torch (1.8.0+cu111), torchvision is ...
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