-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
kind/bugSomething isn't working as expectedSomething isn't working as expectedstatus/triageThis issue needs to be triagedThis issue needs to be triaged
Description
- 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).
- Linux 5.15.7_1:
- Poetry version 1.1.12:
- Link of a Gist with the contents of your pyproject.toml file:
Issue
Added a custom repository like this:
[[tool.poetry.source]]
name = "torch"
url = "https://download.pytorch.org/whl/cu113"
So that I can install torch from here
Tried installing to a venv with a clean install of poetry. I am using pyenv to maintain python versions so I do:
pyenv local 3.9.7
poetry env use 3.9.7
poetry install
And then doing poetry add torch==1.10.0
leads to error
Updating dependencies
Resolving dependencies... (0.5s)
RepositoryError
403 Client Error: Forbidden for url: https://download.pytorch.org/whl/cu113/python-lsp-server/
at ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/repositories/legacy_repository.py:393 in _get
389│ if response.status_code == 404:
390│ return
391│ response.raise_for_status()
392│ except requests.HTTPError as e:
→ 393│ raise RepositoryError(e)
394│
395│ if response.status_code in (401, 403):
396│ self._log(
397│ "Authorization error accessing {url}".format(url=response.url),
If packages are not found in custom repository, why is poetry not falling back to PyPI. This is incredibly frustrating. All these workarounds for installing torch and none of them work because of various issues.
Edit
Changing the custom repo to secondary
[[tool.poetry.source]]
name = "torch"
url = "https://download.pytorch.org/whl/cu113"
and doing poetry add torch --source torch
still throws the same error? Why is poetry checking a seoncary repo?
severinsimmler, sedan07, cyd3r, ben-xD, mosauter and 16 more
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't working as expectedSomething isn't working as expectedstatus/triageThis issue needs to be triagedThis issue needs to be triaged