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.

When having a git dependency, Poetry fails with SolverProblemError while trying to run $ poetry install twice

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: Debian Booster; Windows 10

  • Poetry version: 1.0.0b1 as installed by pip for python 3.8.0b4; 0.12.17

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

Issue

Run

$ poetry new a
$ cd a
$ vim pyproject.toml

Add a single dependency like this:

attrs = { git = "https://github.com/python-attrs/attrs.git", rev = "daf2bc8182a681ed0c85271bafbd24c2ca5ea70b" }

Run $ poetry install. Observe that correct version of attrs is installed

- Installing attrs (19.2.0.dev0 daf2bc8)

Run the same command again: $ poetry install. Observe that Poetry fails with:

[SolverProblemError]
Because no versions of pytest match >=3.0,<3.10.1 || >3.10.1,<4.0
 and pytest (3.10.1) depends on attrs (>=17.4.0), pytest (>=3.0,<4.0) requires attrs (>=17.4.0).
So, because no versions of attrs match >=17.4.0
 and b depends on pytest (^3.0), version solving failed.

Same problem manifests itself for this version of attrs as a path dependency. I tested a few other libraries and they don’t seem to be affected with the exception of mypy, which i believe is due to #611. #743 is a possibly related issue.

The problem can be mitigated by erasing the virtual environment removing poetry.lock.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
sdispatercommented, Nov 14, 2019

@oakkitten It will be fixed in the next beta release which should be out today or tomorrow.

0reactions
oakkittencommented, Nov 19, 2019

looks like this issue is fixed in 1.0.0b5!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dependency specification | master | Documentation - Poetry
Dependency specification Dependencies for a project can be specified in various ... You can combine the git key with the branch key to...
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. Or Why Should You Use Poetry to Manage…
Proper dependency resolution is the top required feature of any package manager worthy of respect yet pip only implemented that feature by late...
Read more >
3. How to package a Python
poetry , the packaging tool we'll use to develop our package later in this chapter ... the next time it is imported, without...
Read more >
Jason L Causey
time poetry add numpy tensorflow Creating virtualenv poetry-example in ... (0.1s) SolverProblemError The current project's Python requirement (>=3.9,<4.0) ...
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