-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Closed
Labels
Description
🐛 Bug
The torch-vision CPU wheel depends on the non-CPU torch wheel
Evidence: torchvision-0.6.0+cpu-cp36-cp36m-linux_x86_64.whl\torchvision-0.6.0+cpu.dist-info\METADATA
:
Metadata-Version: 2.1
Name: torchvision
Version: 0.6.0+cpu
Summary: image and video datasets and models for torch deep learning
Home-page: https://github.com/pytorch/vision
Author: PyTorch Core Team
Author-email: soumith@pytorch.org
License: BSD
Platform: UNKNOWN
Requires-Dist: numpy
Requires-Dist: torch (==1.5.0) <<<==== PROBLEM ====
Requires-Dist: pillow (>=4.1.1)
Provides-Extra: scipy
Requires-Dist: scipy ; extra == 'scipy'
To Reproduce
I've run into this with the poetry package manager for version 1.4.0 and 0.5.0, but the issue is also present in newer versions as can be seen in the previous snippet.
λ poetry lock -vvv
Using virtualenv: C:\Users\korij_000\AppData\Local\pypoetry\Cache\virtualenvs\bla-8bWMJ8mE-
py3.6
Updating dependencies
Resolving dependencies...
1: fact: bla is 0.1.0
1: derived: bla
1: fact: bla depends on torch (1.4.0+cpu)
1: fact: bla depends on torchvision (0.5.0+cpu)
1: selecting bla (0.1.0)
1: derived: torchvision (0.5.0+cpu)
1: derived: torch (1.4.0+cpu)
torch: 1 packages found for torchvision 0.5.0+cpu
torch: 1 packages found for torch 1.4.0+cpu
torch: Downloading wheel: torchvision-0.5.0%2Bcpu-cp27-cp27m-linux_x86_64.whl
1: fact: torchvision (0.5.0+cpu) depends on numpy (*)
1: fact: torchvision (0.5.0+cpu) depends on six (*)
1: fact: torchvision (0.5.0+cpu) depends on torch (1.4.0)
1: fact: torchvision (0.5.0+cpu) depends on pillow (>=4.1.1)
1: derived: pillow (>=4.1.1)
1: conflict: torchvision (0.5.0+cpu) depends on torch (1.4.0) <<<==== PROBLEM ====
1: ! not torch (1.4.0) is satisfied by torch (1.4.0+cpu)
1: ! which is caused by "bla depends on torch (1.4.0+cpu)"
1: ! thus: torchvision is forbidden
1: ! torchvision (0.5.0+cpu) is satisfied by torchvision (0.5.0+cpu)
1: ! which is caused by "bla depends on torchvision (0.5.0+cpu)"
1: ! thus: version solving failed
1: Version solving took 1.964 seconds.
1: Tried 1 solutions.
[SolverProblemError]
Because torchvision (0.5.0+cpu) depends on torch (1.4.0)
and bla depends on torch (1.4.0+cpu), torchvision is forbidden.
So, because bla depends on torchvision (0.5.0+cpu), version solving failed.
Note that I also had to work around another issue just to get poetry to find these packages since they are not on PyPI. See pytorch/pytorch#39779
Expected behavior
I would expect the CPU wheel for torchvision to depend on the CPU version for torch.
hyzhak, marecabo, pawamoy and DriverX