Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

poetry export produces unresolvable requirements.txt #5407

Closed
3 tasks done
Mchristos opened this issue Apr 4, 2022 · 5 comments
Closed
3 tasks done

poetry export produces unresolvable requirements.txt #5407

Mchristos opened this issue Apr 4, 2022 · 5 comments
Labels
kind/bug Something isn't working as expected

Comments

@Mchristos
Copy link

Mchristos commented Apr 4, 2022

  • 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 20.04 (WSL)

  • Poetry version: 1.1.13

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

Issue

Doing poetry export -f requirements.txt and installing dependencies in a fresh virtual environment from the resulting requirements, creates a situation where pip is unable to resolve the dependencies, due to conflicting version requirements among packages.

Specifically, I am doing the following (inside a docker build, I should add)

python -m venv /venv
poetry export -f requirements.txt | /venv/bin/pip install -r /dev/stdin

This yields the following ResolutionImpossible error from pip:

#9 335.2 ERROR: Cannot install -r /dev/stdin (line 62), -r /dev/stdin (line 843) and torch==1.10.2 because these package versions have conflicting dependencies.
#9 335.2 
#9 335.2 The conflict is caused by:
#9 335.2     The user requested torch==1.10.2
#9 335.2     fastai 2.5.3 depends on torch<1.11 and >=1.7.0
#9 335.2     torchvision 0.12.0 depends on torch==1.11.0
#9 335.2 
#9 335.2 To fix this you could try to:
#9 335.2 1. loosen the range of package versions you've specified
#9 335.2 2. remove package versions to allow pip attempt to solve the dependency conflict
#9 335.2 
#9 335.2 ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
------
@Mchristos Mchristos added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Apr 4, 2022
@finswimmer
Copy link
Member

Hello @Mchristos,

please add your pyproject.toml and poetry.lock. Without them no one can try to reproduce your issue.

Thanks!

fin swimmer

@finswimmer finswimmer added the status/waiting-on-response Waiting on response from author label Apr 4, 2022
@Mchristos
Copy link
Author

Apologies, thought I had linked the pyproject gist. Both pyproject and lockfile are linked now:

https://gist.github.com/Mchristos/83b524d022be9bc561b75e68d39d7305

https://gist.github.com/Mchristos/62eea04e582790616f634ed3e48f5fb6

@dimbleby
Copy link
Contributor

dimbleby commented Apr 7, 2022

Your lockfile says:

[[package]]
name = "torchvision"
version = "0.12.0"
description = "image and video datasets and models for torch deep learning"
category = "main"
optional = false
python-versions = ">=3.7"

[package.dependencies]
numpy = "*"
pillow = ">=5.3.0,<8.3.0 || >=8.4.0"
requests = "*"
torch = "*"
typing-extensions = "*"

which is to say that poetry does not think that torchvision 0.12.0 depends on any particular version of torch, contrary to what pip says.

https://pypi.org/pypi/torchvision/0.12.0/json agrees with poetry, whereas the METADATA in the torchvision .whl agrees with pip.

Suggest raise an issue against torchvision asking them to publish consistent information to pypi.

@finswimmer finswimmer removed the status/waiting-on-response Waiting on response from author label Apr 29, 2022
@Mchristos
Copy link
Author

Mchristos commented May 1, 2022

Great, thanks for looking into it and giving feedback. Appreciate it!

Copy link

github-actions bot commented Mar 1, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

4 participants