Skip to content
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

Poetry doesn't check extra sources for package #4854

Open
3 tasks done
JaviFuentes94 opened this issue Nov 30, 2021 · 5 comments
Open
3 tasks done

Poetry doesn't check extra sources for package #4854

JaviFuentes94 opened this issue Nov 30, 2021 · 5 comments
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged

Comments

@JaviFuentes94
Copy link

  • 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).
  • OS version and name: Ubuntu 20.04.3 LTS (Focal Fossa)
  • Poetry version: 1.1.12
  • Contents of your pyproject.toml file:
[tool.poetry]
name = "shit"
version = "0.1.0"
description = ""
authors = ["None"]

[tool.poetry.dependencies]
python = "^3.7"
tensorflow = "1.15.5"

[tool.poetry.dev-dependencies]

[[tool.poetry.source]]
name = "tensorflow"
url = "https://tf.kmtea.eu/whl/stable.html"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

Issue

Poetry is incapable of finding a package from a custom source. The package is also part of pypi, but not for arm64 architectures, so I need to add a custom source to search for it, but it doesn't try to look for it there. This results on poetry add tensorflow==1.15.5 failing on arm64 architectures.

I have added a custom source where this is available (and it works if you do pip install tensorflow==1.15.5 -f https://tf.kmtea.eu/whl/stable.html) but poetry never looks in that source for the package, so the build fails with:

Unable to find installation candidates for tensorflow (1.15.5)

  at ~/.poetry/lib/poetry/installation/chooser.py:74 in choose_for
       70links.append(link)
       7172if not links:
       73raise RuntimeError(
    →  74"Unable to find installation candidates for {}".format(package)
       75│             )
       7677# Get the best link
       78chosen = max(links, key=lambda link: self._sort_key(package, link))

I have also tried with:

[tool.poetry.dependencies]
python = "^3.7"
tensorflow = {version = "1.15.5", source = "tensorflow"}

but it doesn't work either.

Any tips? Thanks!

@JaviFuentes94 JaviFuentes94 added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Nov 30, 2021
@JaviFuentes94
Copy link
Author

JaviFuentes94 commented Nov 30, 2021

Related #4659

@stumpylog
Copy link

I'm assuming this is still an issue? It basically prevents the usage of poetry for projects which support multiple arches but don't want to compile packages which can be found compiled in another repository (example scipy or numpy for armv7).

@IvanaGyro
Copy link

IvanaGyro commented Aug 1, 2023

This seems still an issue now on the master branch.

@xbug42
Copy link

xbug42 commented Apr 4, 2024

Is there any plan to fix this ? This is Just to know if I should wait for a fix or not... Thx !

@dimbleby
Copy link
Contributor

dimbleby commented Apr 4, 2024

this is not broken and should be closed

[tool.poetry.dependencies]
python = "^3.10"
tensorflow = { version = "1.15.5", source = "tensorflow" }

[[tool.poetry.source]]
name = "tensorflow"
url = "https://tf.kmtea.eu/whl/stable.html"
priority = "explicit"

is the current syntax

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

5 participants