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

4

8

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?

Virgy answered 25/7, 2023 at 8:11 Comment(3)
You need to install tensorflow-text==2.12.1 use pip install tensorflow-text==2.12.1Sedition
This will not help me install the latest models though - pip install tf-models-official==2.13.1 It will still crash here. I need TF and TF-text 2.13.1.Virgy
On PyPI you can also see the compatible python versions. tf-text is not compatible with Python 3.11.Jog
V
3

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.

Virgy answered 25/7, 2023 at 13:30 Comment(0)
K
2

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.

Khabarovsk answered 28/9, 2023 at 11:4 Comment(0)
J
0

Getting the same error on Windows. Looks like tensorflow-text is not available on pypi (no wheel for windows since 2022).

I also need to install tf-models-official for image instance segmentation. Since tensorflow-text is a TensorFlow library for text related processing operations (for NLP), Is it really needed? We could manually modify the tf-models-official package to remove the tensorflow-text dependency?

Jaggy answered 26/4, 2024 at 16:36 Comment(0)
N
0

I faced the same problem with installing tensorflow-models-official in Linux. The following worked for me:

conda create -n tensorflow4 python==3.10
conda install pip
pip install tensorflow[and-cuda]
CUDNN_PATH=$(dirname $(python -c "import nvidia.cudnn;print(nvidia.cudnn.__file__)")) 
export LD_LIBRARY_PATH=$CUDNN_PATH/lib:$CONDA_PREFIX/lib/:$LD_LIBRARY_PATH

Then I downloaded the tf_models_official from their website version of 2.16:

pip install ./tf_models_official-2.16.0-py2.py3-none-any.whl

The problem is pyyaml and something related to tensorlow-text apparently do not exist in python>3.10.

Noisy answered 19/7, 2024 at 3:19 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.