[x] If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
OS version and name: Windows 10, but also in a Linux docker container running Ubuntu 18.04
I'm coming here from https://github.com/pytorch/vision/issues/2310, since we are not sure where the problem lies. I'm mostly looking for your insights to try and identify the root cause.
In PEP 440, it says the following in the section "Version Matching":
If the specified version identifier is a public version identifier (no local version label), then the local version label of any candidate versions MUST be ignored when matching versions.
I believe this clause is being interpreted incorrectly by Poetry. When running poetry lock on a pyproject.toml file (see the gist linked above) with the folowing lines, poetry incorrectly reports a conflict:
torch = "1.4.0+cpu"
torchvision = "0.5.0+cpu"
1: conflict: torchvision (0.5.0+cpu) depends on torch (1.4.0)
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
As said in the first line of the debug output, the package torchvision (0.5.0+cpu) depends on torch (1.4.0). However, I've specified that I need torch (1.4.0+cpu). The PEP says that the local identifier MUST be ignored when performing the version match for the constraint coming from the torchvision (0.5.0+cpu) package. So I would say that this conflict is actually an acceptable solution, given the constraints.
Note that Pip has no problem installing this combination of packages.
What do you think? Am I interpreting the PEP wrong or is this really an issue with Poetry's solver?
Same problem here - is there any way to disable URL filename version checking?
Same problem.
I tried to install pytorch and torchvision with local .whl files via these command:
poetry add https://download.pytorch.org/whl/cpu/torch-1.6.0%2Bcpu-cp38-cp38-linux_x86_64.whl
poetry add https://download.pytorch.org/whl/cpu/torchvision-0.7.0%2Bcpu-cp38-cp38-linux_x86_64.whl
When I install pytorch, it was successful.
But when install torchvision, it showed below:
[SolverProblemError]
Because torchvision (0.7.0+cpu) depends on torch (1.6.0) and machinelearning depends on torch (1.6.0+cpu https://download.pytorch.org/whl/cpu/torch-1.6.0%2Bcpu-cp38-cp38-linux_x86_64.whl), torchvision is forbidden. So, because machinelearning depends on torchvision (0.7.0+cpu https://download.pytorch.org/whl/cpu/torchvision-0.7.0%2Bcpu-cp38-cp38-linux_x86_64.whl), version solving failed.
How can I solve this?
You can't, the resolver or the package's dependencies need to change and so far both parties aren't acting on this.
I have fallen back to managing all my deps except torch and vision with poetry and then installing torch and vision with pip in the virtualenv afterwards. It sucks but it's the only reliable way right now.
You can't, the resolver or the package's dependencies need to change and so far both parties aren't acting on this.
I have fallen back to managing all my deps except torch and vision with poetry and then installing torch and vision with pip in the virtualenv afterwards. It sucks but it's the only reliable way right now.
Thanks for your reply. Hope a perfect solution will come soon.
Is there any update on this? It is a real problem for my projects where I rely on torch.
Is there any update on this? It is a real problem for my projects where I rely on torch.
I feel you! No news yet.
Most helpful comment
Is there any update on this? It is a real problem for my projects where I rely on torch.