-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
403 errors on custom repositories #4885
Comments
Duplicate of #4902. |
@severinsimmler But that issue describes a private repo with authentication, this is a public repository of packages, there should be no authentication needed. |
A quick and hacky workaround would be to modify your file at try:
response = self.session.get(url)
if response.status_code == 404:
return
# add these two lines below
if self.url == "https://download.pytorch.org/whl/cu113" and response.status_code == 403:
return
response.raise_for_status()
except requests.HTTPError as e:
raise RepositoryError(e) Note that this probably does not solve all your problems though (e.g. you won't be able to install torchvision). |
My current workaround was to add in [[tool.poetry.source]]
name = "pytorch"
url = "https://download.pytorch.org/whl/cu113"
secondary = true and then I can do
but if I need something from pypi I need to do
EDIT: did not work for |
This will be solved in the next 1.5 release with the introduction of @radoering I suggest closing this issue |
Closing since all described issues should be resolved in Poetry 1.5. There will be Further, as it seems Poetry does not raise an error on 403 anymore for some time now: poetry/src/poetry/repositories/http_repository.py Lines 266 to 280 in 0af3f1e
|
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. |
-vvv
option).Issue
Added a custom repository like this:
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:
And then doing
poetry add torch==1.10.0
leads to errorIf 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
and doing
poetry add torch --source torch
still throws the same error? Why is poetry checking a seoncary repo?The text was updated successfully, but these errors were encountered: