Tensorflow 2.13.1, no matching distribution found for tensorflow-text 2.13.0

Question:

I am trying to install the latest Tensorflow models 2.13.1 (pip install tf-models-official==2.13.1), with Python 3.11. There seems to be an issue with Cython and PyYAML not playing nice together since last week in Tensorflow models 2.13.0, so it won’t install.

But 2.13.1 is giving me an error that the corresponding tensorflow-text version 2.13.0 is not found.
The error I am receiving is as follows:

(tensorflow-env) username@DESKTOP:~/projects/tensorflow/models-master/research$ pip install tf-models-official==2.13.1
INFO: pip is looking at multiple versions of tf-models-official to determine which version is compatible with other requirements. This could take a while.
ERROR: Ignored the following versions that require a different python version: 1.21.2 Requires-Python >=3.7,<3.11; 1.21.3 Requires-Python >=3.7,<3.11; 1.21.4 Requires-Python >=3.7,<3.11; 1.21.5 Requires-Python >=3.7,<3.11; 1.21.6 Requires-Python >=3.7,<3.11; 1.6.2 Requires-Python >=3.7,<3.10; 1.6.3 Requires-Python >=3.7,<3.10; 1.7.0 Requires-Python >=3.7,<3.10; 1.7.1 Requires-Python >=3.7,<3.10; 1.7.2 Requires-Python >=3.7,<3.11; 1.7.3 Requires-Python >=3.7,<3.11; 1.8.0 Requires-Python >=3.8,<3.11; 1.8.0rc1 Requires-Python >=3.8,<3.11; 1.8.0rc2 Requires-Python >=3.8,<3.11; 1.8.0rc3 Requires-Python >=3.8,<3.11; 1.8.0rc4 Requires-Python >=3.8,<3.11; 1.8.1 Requires-Python >=3.8,<3.11
ERROR: Could not find a version that satisfies the requirement tensorflow-text~=2.13.0 (from tf-models-official) (from versions: 2.12.0rc0, 2.12.0, 2.12.1, 2.13.0rc0)
ERROR: No matching distribution found for tensorflow-text~=2.13.0

But the release history on pypi.org shows that the 2.13.0 version of tensorflow-text is out: https://pypi.org/project/tensorflow-text/2.13.0/#history

What am I doing wrong?

Asked By: Karl Johan Vallner

||

Answers:

I resolved the issue, by installing

Python 3.10
Tensorflow 2.13.0
tensorflow-text 2.13.0
tensorflow-models-official 2.13.1

Everything works with these versions, but I did not find a way to make it work with Python 3.11 atm.

The issue is best described here (https://github.com/yaml/pyyaml/issues/724) and has to do with Cython and PyYAML 5.4 dependency issues.

Answered By: Karl Johan Vallner

I faced the exact same problem, when trying to install the mediapipe-model-maker pip package.

It turns out that the maintainers of tensorflow-text stopped providing pre-built python wheels for several operating systems (now supporting only Linux or Intel-based macs).
That’s why pip install can’t find a matching distribution for tensorflow-text~=2.13.0.

Instead, you must either build it youself or rely on Official Build Collaborators, who generously build and upload them for us.
For instance, for Arm-based macs you can download and manually install the whl file from this Github repository.

Answered By: Yam Horesh