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 cannot install the latest torch version #2247

Closed
vikigenius opened this issue Mar 30, 2020 · 5 comments
Closed

poetry cannot install the latest torch version #2247

vikigenius opened this issue Mar 30, 2020 · 5 comments
Labels
area/solver Related to the dependency resolver kind/bug Something isn't working as expected

Comments

@vikigenius
Copy link

vikigenius commented Mar 30, 2020

  • [*] 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).

Issue

Tried to add torch 1.4 with no success. It goes into some kind of infinite loop and never stops. It also seems to be downloading the wrong wheel and then just gets stuck.

poetry add torch --platform linux --python 3.8 -vvv

Tries to download the following wheel: PyPI: Downloading wheel: torch-1.4.0-cp27-cp27m-manylinux1_x86_64.whl and then gets stuck here.

The correct wheel would be torch-1.4.0-cp38-cp38-manylinux1_x86_64.whl

EDIT:
Simply trying to poetry add torch also leads to the same issue

@vikigenius vikigenius added the kind/bug Something isn't working as expected label Mar 30, 2020
@finswimmer finswimmer added the area/solver Related to the dependency resolver label Mar 30, 2020
@huntzhan
Copy link

Same issue here:

  • OS: macOS 10.15.3
  • Poetry version: 1.0.5

@seanytak
Copy link

seanytak commented Apr 8, 2020

Same issue:

  • OS: Windows 10.0.18363
  • Poetry version: 1.0.5

@abn
Copy link
Member

abn commented Apr 8, 2020

The "Download wheel" log relates to a missing requires_dist in the pypi json data for the package, thereby causing poetry to fallback to downloading the first available wheel to introspect.

This will still lead to the correct version of the package being installed as the initial download is performed only for metadata parsing. See blow. Additionally, the delay is because the package torch is larger than your usual package on PyPI. Waiting for it to download will succeed. Once the cache is available there should no longer be a wait.

$ poetry add torch --platform linux --python "^3.7" -vvv
Using virtualenv: ***/.venv
PyPI: 18 packages found for torch *
Using version ^1.4.0 for torch

Updating dependencies
Resolving dependencies...
   1: fact: platform-detection is 0.1.0
   1: derived: platform-detection
   1: fact: platform-detection depends on torch (^1.4.0)
   1: selecting platform-detection (0.1.0)
   1: derived: torch (^1.4.0)
PyPI: 1 packages found for torch >=1.4.0,<2.0.0
PyPI: Getting info for torch (1.4.0) from PyPI
PyPI: No dependencies found, downloading archives
PyPI: Downloading wheel: torch-1.4.0-cp27-cp27m-manylinux1_x86_64.whl
   1: selecting torch (1.4.0)
   1: Version solving took 27.945 seconds.
   1: Tried 1 solutions.

Writing lock file


Package operations: 1 install, 0 updates, 0 removals

  - Installing torch (1.4.0)
$ cat .venv/lib/python3.7/site-packages/torch-1.4.0.dist-info/WHEEL 
Wheel-Version: 1.0
Generator: bdist_wheel (0.33.6)
Root-Is-Purelib: false
Tag: cp37-cp37m-linux_x86_64

Closing this as this is not an issue. The situation will be improved via #2284 and #999.

@mzhadigerov
Copy link

@abn What If I want to keep torch dependency platform independent?

Copy link

github-actions bot commented Mar 2, 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 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/solver Related to the dependency resolver kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

6 participants