gnn icon indicating copy to clipboard operation
gnn copied to clipboard

TFGNN can not be includes as dependency to a project that uses poetry for dependency management

Open post2web opened this issue 7 months ago • 2 comments

poetry is a very popular dependency manager for python applications. Currently, we can not include tensorflow-gnn as a dependency because we see error message:

Package 'tensorflow-macos' is listed as a dependency of itself.

Searching GitHub confirms that nobody is able to include tensorflow-gnn as a dependency in a poetry project.

To recreate this error, create an empty directory with a file named pyproject.toml:

[project]
name = "test"
version = "0.1.0"
requires-python = ">=3.9,<4"

[tool.poetry.dependencies]
tensorflow-gnn = "^1.0.3"

[build-system]
requires = ["poetry-core>=2.0.0,<3.0.0"]
build-backend = "poetry.core.masonry.api"

Install poetry and run:

poetry lock

post2web avatar May 15 '25 17:05 post2web

Newer versions of tensorflow as 2.18 and 2.19 do have arm64 build wheel. Maybe the tensorflow-macos dependency can be removed.

post2web avatar May 15 '25 17:05 post2web

Confirmed: https://github.com/tensorflow/tensorflow/releases/tag/v2.16.1 (released 2024-03-07) reports

  • Apple Silicon users: If you previously installed TensorFlow using pip install tensorflow-macos, please update your installation method. Use pip install tensorflow from now on.
  • Mac x86 users: Mac x86 builds are being deprecated and will no longer be released as a Pip package from TF 2.17 onwards.

Indeed, https://pypi.org/project/tensorflow-macos/#history reports 2.16.2 (released 2024-06-28) as the latest version, so it's been a year now.

arnoegw avatar Jul 04 '25 13:07 arnoegw