Skip to main content

Fixed: "all versions of tensorflow have no wheels with a matching Python version tag (e.g., cp315)"

· 7 min read
Jagdish Kumawat
Founder @ Dewiride

On Python 3.15, uv add tensorflow stopped with all versions of tensorflow have no wheels with a matching Python version tag (e.g., cp315). TensorFlow 2.22.0, the newest release, publishes packages for Python 3.10 to 3.14 only. Moving the project to Python 3.14 fixed it.

What I Was Doing​

I made a new uv project on Python 3.15.2, the newest Python, and added TensorFlow to it:

Terminal
uv init --python 3.15 tf-on-python-315
cd tf-on-python-315
uv add tensorflow

What I Expected​

uv to install TensorFlow 2.22.0 and the packages it needs, as uv add tensorflow does in a Python 3.14 project.

What I Got​

Output
Initialized project `tf-on-python-315` at `/Users/you/source/tf-on-python-315`
Using CPython 3.15.2 interpreter at: /Library/Frameworks/Python.framework/Versions/3.15/bin/python3.15
Creating virtual environment at: .venv
error: Failed to add dependencies
cause: No solution found when resolving dependencies
cause: Because all versions of tensorflow have no wheels with a matching Python version tag (e.g., `cp315`) and your project depends on tensorflow, we can conclude that your project's requirements are unsatisfiable.

hint: Wheels are available for `tensorflow` (v2.22.0) with the following Python ABI tags: `cp310`, `cp311`, `cp312`, `cp313`, `cp314`

hint: If you want to add the package regardless of the failed resolution, provide the `--frozen` flag to skip locking and syncing

The terminal after uv add tensorflow on Python 3.15.2: error: Failed to add dependencies, because all versions of tensorflow have no wheels with a matching Python version tag (e.g., cp315), and a hint that wheels are available for tensorflow v2.22.0 with the tags cp310, cp311, cp312, cp313 and cp314.

uv created the project's environment with CPython 3.15.2, then found no TensorFlow it could install there, and stopped. Nothing was installed.

What I Checked​

1. What the hint says​

A wheel is a ready-to-install package, built for particular Python versions. Its tag names them: cp314 means CPython 3.14, and cp315 CPython 3.15. The hint lists the tags of TensorFlow 2.22.0's wheels: cp310 to cp314. There's no cp315.

2. What TensorFlow's release notes say​

The TensorFlow 2.22.0 release notes agree: "Added official support for Python 3.14 (cp314) across Linux, macOS, and Windows (supporting Python 3.10–3.14)". Python 3.15 isn't in that range.

3. Why uv needs a 3.15 package at all​

uv init --python 3.15 wrote requires-python = ">=3.15" into pyproject.toml: the project promises to work on Python 3.15 and later. uv's resolution documentation explains what that means for every package it adds: "During universal resolution, all required packages must be compatible with the entire range of requires-python declared in the pyproject.toml." For TensorFlow, that range starts at 3.15.

Why It Happens​

The project says it needs Python 3.15 or later, so uv needs a TensorFlow that installs on 3.15. TensorFlow 2.22.0 has no wheels for 3.15, and no older version has them either, so there's nothing uv can choose.

The Fix​

Move the project to Python 3.14, the newest version TensorFlow supports. My first try was to pin it straight away:

Terminal
uv python pin 3.14
Output
error: The requested Python version `3.14` is incompatible with the project `requires-python` value of `>=3.15`.

The terminal after uv python pin 3.14: error: The requested Python version 3.14 is incompatible with the project requires-python value of >=3.15.

uv refused, because requires-python still said >=3.15. So first change that line in pyproject.toml:

pyproject.toml
requires-python = ">=3.14"

Then pin again:

Terminal
uv python pin 3.14
Output
Updated `.python-version` from `3.15` -> `3.14`

The terminal after the second uv python pin 3.14: Updated .python-version from 3.15 -> 3.14.

.python-version is the file that tells uv which Python to use for this project. How to Change a uv Project's Python Version with uv python pin explains both commands in detail. Now add TensorFlow again:

Terminal
uv add tensorflow
Output
Using CPython 3.14.10
Removed virtual environment at: .venv
Creating virtual environment at: .venv
Resolved 32 packages in 2.45s
Built tf-on-python-315 @ file:///Users/you/source/tf-on-python-315
Prepared 32 packages in 27.00s
Installed 32 packages in 236ms
+ absl-py==2.5.1
+ astunparse==1.6.3
+ certifi==2026.11.20
+ charset-normalizer==3.5.3
+ flatbuffers==25.12.19
+ gast==0.7.0
+ google-pasta==0.2.0
+ grpcio==1.86.0
+ h5py==3.15.1
+ idna==3.20
+ keras==3.15.1
+ libclang==18.1.1
+ markdown-it-py==4.3.0
+ mdurl==0.1.2
+ ml-dtypes==0.7.0
+ namex==0.1.0
+ numpy==2.5.5
+ opt-einsum==3.4.0
+ optree==0.20.0
+ packaging==26.4
+ protobuf==7.36.2
+ pygments==2.21.0
+ requests==2.34.2
+ rich==15.0.0
+ six==1.17.0
+ tensorflow==2.22.0
+ termcolor==3.3.0
+ tf-on-python-315==0.1.0 (from file:///Users/you/source/tf-on-python-315)
+ typing-extensions==4.16.0
+ urllib3==2.8.0
+ wheel==0.48.0
+ wrapt==2.5.2

The terminal after uv add tensorflow on Python 3.14: uv used CPython 3.14.10, removed and recreated .venv, resolved and installed 32 packages, including keras 3.15.1, numpy 2.5.5 and tensorflow 2.22.0.

uv switched to CPython 3.14.10, replaced the 3.15 environment with a new one, and installed 32 packages: TensorFlow 2.22.0, the 30 packages it needs, and the project itself.

After the Fix​

Terminal
uv run python -c "import tensorflow as tf; print(tf.__version__)"
Output
2.22.0

The terminal after importing TensorFlow and printing its version: 2.22.0.

TensorFlow imports and reports 2.22.0. The first import in a new environment is slow, so give it a minute. The commands on this page work unchanged in PowerShell.

Common Mistakes​

MistakeWhat happensDo this instead
Pinning 3.14 before changing requires-pythonerror: The requested Python version `3.14` is incompatible with the project `requires-python` value of `>=3.15`.Change requires-python first
Following the hint's --frozen flaguv add tensorflow --frozen wrote tensorflow into pyproject.toml without installing anything, and the next uv run stopped with the same errorMove the project to Python 3.14

Troubleshooting​

SymptomLikely causeFix
all versions of tensorflow have no wheels with a matching Python version tag (e.g., cp315)The project's requires-python starts at Python 3.15requires-python = ">=3.14", then uv python pin 3.14
The requested Python version `3.14` is incompatible with the project `requires-python` value of `>=3.15`.requires-python still says >=3.15Change it before you pin
ModuleNotFoundError: No module named 'tensorflow'Python was started outside the project, where TensorFlow isn't installedRun it with uv run in the project folder

FAQ​

When will TensorFlow work on Python 3.15?​

When TensorFlow publishes wheels tagged cp315. The 2.22.0 release notes list Python 3.10 to 3.14.

Do I have to remove Python 3.15?​

No. uv python pin only wrote this project's .python-version file, so other projects can keep using Python 3.15.

Conclusion​

all versions of tensorflow have no wheels with a matching Python version tag (e.g., cp315) meant the project asked for Python 3.15, which TensorFlow 2.22.0 has no packages for. With requires-python = ">=3.14" and uv python pin 3.14, uv add tensorflow installed TensorFlow 2.22.0 on Python 3.14.10.

Additional Resources​