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 can't find the right installation candidate of tensorflow with python 3.9 #4605

Closed
3 tasks done
kretes opened this issue Oct 6, 2021 · 5 comments
Closed
3 tasks done
Labels
kind/bug Something isn't working as expected status/duplicate Duplicate issues status/external-issue Issue is caused by external project (platform, dep, etc)

Comments

@kretes
Copy link

kretes commented Oct 6, 2021

  • 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: Docker. Host & image run ubuntu 20.04

  • Poetry version: 1.1.11

  • Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/kretes/3e82c4fced9e39bf93ab89ba18f21b6a

Issue

Having an example toml with just:

python = "~3.9"
tensorflow = "*"
h5py = "*"
scikit-learn = "*"

makes poetry select tensorflow down to 2.0.2, for which it eventually fails with Unable to find installation candidates for tensorflow (2.0.2)
due to the fact there is no wheel for it for python 3.9 - https://pypi.org/project/tensorflow/2.0.2/#files

If I specify a version constraint for tensorflow e.g. >2.5 - it finds other combination of dependencies' versions and it works.

The gist contains a dockerfile and a pyproject.toml and a log when I try to build the image.

@kretes kretes added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Oct 6, 2021
@dimbleby
Copy link
Contributor

dimbleby commented Jun 4, 2022

If the latest versions of everything are not compatible with one another, then of course poetry must choose to hold some things down-level.

If you care about which things are at the latest version , then providing a version constraint is the right answer.

tensorflow 2.0.2 gives no restriction on requires_python in its metadata; there's not much poetry can do about it if tensorflow publishes no 3.9-installable package.

Not a bug.

@Tlaloc-Es
Copy link

Try with this python = ">=3.10, <3.12"

@SergeyHein
Copy link

I'm experiencing same issue with python 3.11 under docker & WSL 2

(test-py3.11) root@a634e1891f96:/data/test# python --version
Python 3.11.6
(test-py3.11) root@a634e1891f96:/data/test# pip list
Package    Version
---------- -------
pip        23.3.2
setuptools 69.0.2
(test-py3.11) root@a634e1891f96:/data/test# cat pyproject.toml 
[tool.poetry]
name = "test"
version = "0.1.0"
description = "test"
authors = ["test"]
readme = "README.md"

[tool.poetry.dependencies]
python = "~3.11"




[tool.poetry.group.dev.dependencies]
black = "^23.10.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
(test-py3.11) root@a634e1891f96:/data/test# poetry add tensorflow
Using version ^2.15.0.post1 for tensorflow

Updating dependencies
Resolving dependencies... (1.3s)

Because no versions of tensorflow match >2.15.0.post1,<3.0.0
 and tensorflow (2.15.0.post1) depends on tensorflow-intel (2.15.0.post1), tensorflow (>=2.15.0.post1,<3.0.0) requires tensorflow-intel (2.15.0.post1).
So, because no versions of tensorflow-intel match 2.15.0.post1
 and test depends on tensorflow (^2.15.0.post1), version solving failed.
 

@dimbleby
Copy link
Contributor

dimbleby commented Jan 31, 2024

that's not the same thing, though this also is not poetry's fault.

what you are seeing is a duplicate of #8764

both are issues with tensorflow and not with poetry

@radoering radoering added status/duplicate Duplicate issues status/external-issue Issue is caused by external project (platform, dep, etc) and removed status/triage This issue needs to be triaged labels Feb 4, 2024
@radoering radoering closed this as not planned Won't fix, can't repro, duplicate, stale Feb 4, 2024
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected status/duplicate Duplicate issues status/external-issue Issue is caused by external project (platform, dep, etc)
Projects
None yet
Development

No branches or pull requests

5 participants