Reputation: 797
I succeeded in pytorch installation thanks to answers here Poetry and PyTorch.
But, I'm still failed to install torchvision via poetry.
> poetry add torchvision==0.8.2
Updating dependencies
Resolving dependencies...
Writing lock file
Package operations: 1 install, 0 updates, 0 removals
• Installing torchvision (0.8.2)
RuntimeError
Unable to find installation candidates for torchvision (0.8.2)
at ~\.poetry\lib\poetry\installation\chooser.py:72 in choose_for
68│
69│ links.append(link)
70│
71│ if not links:
→ 72│ raise RuntimeError(
73│ "Unable to find installation candidates for {}".format(package)
74│ )
75│
76│ # Get the best link
Failed to add packages, reverting the pyproject.toml file to its original content.
I googled it and found some answers that say 'just pip install torchvision
'.
But I'm suspicious that it works because according to PyPi(https://pypi.org/project/torchvision/#files), there is no wheel file for windows. And I tried it and it failed as I expected.
Is there any way to install latest torchvisin which is compatible with latest torch(1.7.1) in windows? + via poetry?
Upvotes: 3
Views: 6371
Reputation: 31
I got the same issue, I just reopen terminal and all worked good. I guess I was in some wrong environment.
Upvotes: 0
Reputation: 469
pyproject.toml
file. For example I have torchvision 1.8.0 working with the following in my dependencies[tool.poetry.dependencies]
python = "^3.8"
torch = {url = "https://download.pytorch.org/whl/cu102/torch-1.8.0-cp38-cp38-win_amd64.whl"}
torchvision = {url = "https://download.pytorch.org/whl/cu102/torchvision-0.9.0-cp38-cp38-win_amd64.whl"}
poetry update torchvision
and you should be good to go.Upvotes: 2