Poetry: Poetry fails because it tries to install an unneeded dependency

Created on 25 Sep 2018  路  4Comments  路  Source: python-poetry/poetry

  • [x] I am on the latest Poetry version.
  • [x] I have searched the issues of this repo and believe that this is not a duplicate.
  • [x] If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: Ubuntu 16.04
  • Poetry version: 0.11.5
  • Link of a Gist with the contents of your pyproject.toml file: Sorry, can't upload due to it being a project at work. But I think it should not be relevant to the error, as my file is very minimal. I specify python 3.6 as a requirement.

Issue

Hi guys,

I tried out poetry because pipenv has unresolved dependency conflicts, where they should not happen.
Unfortunately, something similar happenend to me now with poetry.

In my dependencies, I use a private module which requires shove>=0.6.6. With pipenv, this installs without a problem:
Screenshot

With poetry, it tries to install the package futures==3.2.0, which is clearly not compatible:

Updating dependencies
Resolving dependencies... (34.5s)

Package operations: 42 installs, 26 updates, 0 removals

Writing lock file

  • Installing futures (3.2.0)

[VenvCommandError]
Command ['pip', 'install', '--no-deps', '--index-url', 'xxxx/repository/pypi-all/sim
ple', 'futures==3.2.0'] errored with the following output:
Looking in indexes: xxxx/repository/pypi-all/simple
Collecting futures==3.2.0
Using cached xxxx/repository/pypi-all/packages/1f/9e/7b2ff7e965fc654592269f2906ade1c7d705f1bf25b7d469fa153f7d19eb/futures-3.2.0
.tar.gz
futures requires Python '>=2.6, <3' but the running Python is 3.5.2

install [--no-dev] [--dry-run] [-E|--extras EXTRAS] [--develop DEVELOP]

According to poetry show --tree, futures is a requirement for shove:
screenshot

This seems not right to me and I don't understand the different behavior in comparison to pipenv.

Thanks!

Bug Dependency resolution

Most helpful comment

Thanks for reporting this and sorry about that!

This has already been fixed on the develop branch and the fix will be officially released in the next 0.12 version.

You can already try it if you want by installing the current 0.12 pre release, preferably by using the new recommended installer.

curl -sSL https://raw.githubusercontent.com/sdispater/poetry/develop/get-poetry.py

See https://github.com/sdispater/poetry/blob/develop/docs/docs/index.md#installation for more information

All 4 comments

Thanks for reporting this and sorry about that!

This has already been fixed on the develop branch and the fix will be officially released in the next 0.12 version.

You can already try it if you want by installing the current 0.12 pre release, preferably by using the new recommended installer.

curl -sSL https://raw.githubusercontent.com/sdispater/poetry/develop/get-poetry.py

See https://github.com/sdispater/poetry/blob/develop/docs/docs/index.md#installation for more information

Thanks for the quick reaction, I will try that!

Hmm, with version 0.12.0a2, the same error happens, futures is in the pyproject.lock-file as a dependency of shove :(

I will try to set up a new environment soon, as I think this could also be an error source.

futures is in the pyproject.lock file because it is indeed a dependency of shove. However, now, Poetry will now choose a version of futures <3.2.0 which does not have a Python restriction.

Basically, shove does not use environment markers to tell that futures should be installed only for Python < 3.0 so Poetry can only assume that it is a strict dependency.

This is an issue upstream and should be fixed by the shove maintainers.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nikaro picture nikaro  路  3Comments

mozartilize picture mozartilize  路  3Comments

ambv picture ambv  路  3Comments

ghost picture ghost  路  3Comments

etijskens picture etijskens  路  3Comments