tensorflow: It doesn't support on python3.13

Issue type

Build/Install

Have you reproduced the bug with TensorFlow Nightly?

No

Source

source

TensorFlow version

tf 2.17

Custom code

Yes

OS platform and distribution

macos sequoia arm

Mobile device

No response

Python version

3.13

Bazel version

No response

GCC/compiler version

No response

CUDA/cuDNN version

No response

GPU model and memory

No response

Current behavior?

It doesn’t work when I want to install via terminal with the installation code.

Standalone code to reproduce the issue

ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow

Relevant log output

No response

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 40
  • Comments: 104 (3 by maintainers)

Commits related to this issue

Most upvoted comments

python 3.13 is important because it’s the default and only version in the latest fedora 41 (released 2024-10-29) fedora is a major distro and many users are upgrading to the latest version.

I don’t expect tf to support every distro. but python 3.13 is the latest released stable version from python foundation and is used by a major distro. it would be a shame not to support it. I believe we need to adjust or sync the process.

those releases are scheduled and predictable

we just need to do the following when a new stable python is released by PSF just get last tag and rebuild it and push the wheel for that python version. there is nothing preventing us from doing this simple automation and I’m not aware of any compatibility issue preventing us from doing this. the current state seems careless, lazy and incompetent.

TensorFlow always supports the new Python version in the release that follows nearly a quarter after the Python release. This is because the TensorFlow release cycle starts before the Python release occurs and cannot be changed mid-flight. If you look at past issues, you see that this has been an issue since at least python 3.8.

It has been suggested to test release candidates, etc., but no improvements have been made on this front.

As an open source maintainer[^1], I’ve got to say that the entitlement in this thread is just off the charts.

Whether funded by $BIGCORP or run by volunteers in their spare time, you don’t get to dictate how a given FOSS project prioritizes its work. You’re not paying for anything, and so you’re (still) getting what you paid for. Of course, you could rearchitect your own project to switch to another framework or language, but that sure sounds like a lot of work - definitely easier to just demand stuff…

Speaking of, if you think you need python 3.13 today (or freethreading tomorrow, etc.): No library requires python 3.13[^3], and >99.9% of applications could be done equivalently on 3.12 (aside from some minor performance gains[^2]). Even the semi-official 3.13 feature overview notes:

So, having seen all these new improvements, should you upgrade to Python 3.13? Like for every release, the answer is a clear and loud it depends!

Engineers are used to making trade-offs (c.f. “it depends”), and to collaborate professionally. If you know how to do neither one nor the other, you’re probably… not as good of a programmer as you think you are.

[^1]: of a large, cross-platform, rolling distribution, including for our tensorflow recipe

[^2]: and if those performance gains have a measurable financial impact, why are you not offering to pay (a portion of that) to your FOSS dependencies to do the work necessary to support a new python version?

[^3]: because it would be project suicide to artificially restrict your reach to ~2.5% of current python users (as measured through overall PyPI downloads; see “Consumer statistics” here - that’s linux-only but has a nice dashboard; for everything else there’s pypinfo)

It’s been 5 months since the release of 3.13. I doesn’t seem like you guys know how long a quarter is.

It has always been the policy of TF to do a release that supports a new version of Python after that release. This time the team slipped and missed one release, but @learning-to-play 's team already worked on this. Nightly already supports 3.13 and next release would support it too.

Please stop spamming with demands for support or we will be forced to lock the thread. There has been no PR submitted to the repository by people complaining here, the commit mentioned is from the OSS team.

Unfortunately the build system for TF is too complicated for this.

There needs to be a lot of work done to make that possible. Plus, TF has a large number of dependencies that also need to start supporting the new version of Python. And, C++ <-> Python interop has a lot of issues with any new version of Python.

TensorFlow always supports the new Python version in the release that follows nearly a quarter after the Python release. This is because the TensorFlow release cycle starts before the Python release occurs and cannot be changed mid-flight. If you look at past issues, you see that this has been an issue since at least python 3.8.

It has been suggested to test release candidates, etc., but no improvements have been made on this front.

This is still true. Until the next release next year, there won’t be a change.

Same issue

I am going to uninstall Python 3.13 and install an older python version.

right/wrong arguments don’t advance the common interests of the project and it’s users. There are 3 ways we could contribute to FOSS:

  1. Use and test it. Create an issue here to bring it to the attention of active members of the project.
  2. More capable? create a PR.
  3. $$$

I have seen some even worse FOSS projects here in github - months or years since the last commit, no response or whatsoever to any issue / discussion created in the repos. Talking about “disregard”, these maintainers definitely win the title. So, be grateful when the maintainers of the FOSS projects respond. Let’s create a net-positive environment the FOSS projects to thrive - both as users and maintainers.

And let’s keep the tensor flowing!

TF team do this every single release and they tell people that PSF made breaking changes in the new python, when in reality it’s just an incompetent in-house build system problem.

@muayyad-alsadi can you build against 3.13 without making changes for:

Or if you already have a working 3.13 build with those changes made you could submit them.

This reminds me of nvidia/ubuntu mentality. Canonical had one kernel developer and his only job is to make sure they ship a kernel that works with nvidia drivers, if not they ship the older kernel.

As long as there are no breaking changes done by PSF in their latest stable python, we should build and publish the wheels. We should not hold innovation waiting for church approval.

On Thu, Jan 2, 2025, 9:03 PM ndbecker @.***> wrote:

python 3.13 is important because it’s the default and only version in the latest fedora 41 (released 2024-10-29) fedora is a major distro and many users are upgrading to the latest version.

I don’t expect tf to support every distro. but python 3.13 is the latest released stable version from python foundation and is used by a major distro. it would be a shame not to support it. I believe we need to adjust or sync the process.

those releases are scheduled and predictable

There is python 3.12 on Fedora 41, sudo dnf install python3.12

— Reply to this email directly, view it on GitHub https://github.com/tensorflow/tensorflow/issues/78774#issuecomment-2568162170, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKAPK53JUKE37TFVN5K3AL2IV5OTAVCNFSM6AAAAABQTWNUISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRYGE3DEMJXGA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

If there were a competition for the worst management by a project of technical changes outside the project (such as Python 3.13 or numpy 2.2), tensorflow would probably be a good candidate for the gold medal. Of course it’s easier to do for a small project but it’s also a question of managing priorities and taking into account community needs.

You’re always welcome to contribute to an open-source project yourself rather than complain that others aren’t doing what you want (for free).

Approximately, each version released between 3 and 5 months.

python 3.13 was released by PSF in oct 2024 so it’s not a matter of 3-5 months

TF team released TF versions after that and they did not include support for py3.13

  1. there is no ABI breaking changes in py3.13
  2. archlinux team was able to build TF for py3.13 (so it’s not a matter of compatibility issues)

it’s just TF team pinning versions for internal google processes and pipelines disregarding opensource community.

Apologies for the wrong signal sent by 👎. I wanted a quick feedback to signal that you are repeating the same information, in a way that could be construed as aggressive and against the code of conduct.

This is not Reddit or similar, so a 👎 has no effect (I got a few myself too, even here, including from you). But, taking into account your feedback, I have removed it.

Regarding the rest of your message, I can only reply by repeating what I have already said. In the spirit of making progress here, I will just summarize:

  • Stable release of new Python version is impossible to add after branch cut
  • Testing RCs of new Python version just before release train starts risks delaying releases for everyone and then can lead to issues down the line (e.g., Python 3.11 docker images for some TF versions are on an RC version even now because of this)
  • Release calendar has to take into account multiple priorities and coding freezes. It cannot be shifted around to match the Python release schedule.
  • Nightly support of new Python version can be added, but in general it gets delayed. It is the responsibility of the OSS team to do so and they have to juggle quite a large number of priorities. Please assume the best intentions, there is no one that wants the community to not be supported
  • I have left the TF OSS team in 2022 and have been only helping here and there to smooth the transition. I do not represent the TF team and I don’t know why you are picking on me. I’m just responding to the issue rather than let it stale.

Please make sure to read the code of conduct.

So, two things:

  • This issue is about tensorflow not supporting 3.13. If you read the error message, it quite clearly doesn’t support 3.13.
  • If you try to actually patch the files (as we tried in Arch), you’ll see various failures in parts of tensorflow. I can get you some logs but you can also try it yourself.

I think I mentioned this before. In the old days Ubuntu used to ship a year old kernel just because some lazy nvidia employee did not update closed source nvidia drivers to work with latest kernel. We used to hate this, but we understand why it happens, because it’s closer source. It’s a church not a bazar.

This is not supposed to happen in opensource It might happens once due to introduced breaking changes or major releases

But with TF it happens systematically every single minor release from PSF.

If I got a fresh device, mac, windows or linux (arch or fedora) having latest stable python from python foundation I should be able to install tf.

If once I could not do that due to some major breaking changes from PSF, we understand this. But this should not be the normal process that happens every release.

There should be a way to unpin versions, get latest. If there are foreign structure there should be a script to update them.

The entire thread is about what is the work we need to do so we don’t have to open such ticket evey 6 months with every new minor python release.

I’m not asking you to support every new feature in every new python release. Just rebuild the latest TF with latest Python from PSF. Don’t be the old nvidia church. Do not hold us to a year old python.

If there were a competition for the worst management by a project of technical changes outside the project (such as Python 3.13 or numpy 2.2), tensorflow would probably be a good candidate for the gold medal. Of course it’s easier to do for a small project but it’s also a question of managing priorities and taking into account community needs.

I feel like there should be some simple compatibility test which is only ran once per operating system after each version change for such a popular and important repo.

  • install/import tensorflow
  • run tensorflow operation
  • assert expected result

For a pure Python package, I agree. And then a PR with a new requirements.txt could be created and tested on the fly when new versions arrive.

But for TF and similar projects that also need to use Python’s C API, there’s much more work. The project produces wheels for each version of Python, operating system, CPU/GPU variant. So there are multiple steps in the build pipeline that need to be update, VMs to provision, etc. @learning-to-play might comment more on that or help with prioritization, but from my time in TF team it took a few days to fully provision the pipeline for a new version of Python, even if there were no other incompatibilities. Each incompatibility adds complexity, needs more team to weigh in, needs more testing, runs into potential issues with the internal CI from the Google’s monorepo (which is pinned globally to just one Python version).

@loqs Thanks for providing the latest version 2.19 compatible with Python 3.13 in Arch Linux.

So tf-nightly 2.20 released without support for python 3.13 and few months later python 3.14 will be released.

yes, TF team do this every single release and they tell people that PSF made breaking changes in the new python, when in reality it’s just an incompetent in-house build system problem resulted from pinning the version.

when the RC is released they will close this ticket and pretend it’s fixed. then we will open a new one for python 3.14 then we wait half a year, then close it again.

Found out today 3.13 cannot run TF. Numpy not in 3.13 as of a few weeks ago. venv anyone?

The Arch Linux developers has successfully provided a patch to make TensorFlow work with python 3.13

@VedeshP please do not go off-topic. You should do your homework on Stack Overflow or other forums instead.

It’s really not tedious at all, pip freeze > requirements.txt and then in the new environment pip install -r requirements.txt

@VedeshP why don’t you dump the venv with pip freeze to a requirementx.txt file? You may also use pipreqs if you want leaf packages only.

Next release of TF. Branch cut should occur by mid of February at most and final release at most a month after, assuming no delays.

To be clear, I am still of the opinion that tf-nightly should already support 3.13, it’s not really ok to delay adding support to it for so long.

Error in fail: 
Could not find requirements_lock.txt file matching specified Python version.
Specified python version: 3.13
Python versions with available requirement_lock.txt files: 3.9, 3.10, 3.11, 3.12

you must be kidding, let’s have mutual respect, I can read and this is not the actual build log this is just an early exist resulted from a pinned version that can patched by a single-line change. basically it says “we don’t want you to to try to build it on 3.13”. Pinning the versions happens after a successful build not before it. It’s a political decision not a technical barrier.

the current status of tensorflow is unacceptable as it’s uninstallable on windows, macos and latest fedora linux all with latest stable python from python foundation.

More capable? create a PR.

The PR to make it work with py3.13 is already there (thank to archlinux users).

Again and again, what is preventing support for py3.13 is not technical. It’s some politics and processes inside the church of TF team (reference to church vs Bazar from open source culture).

All, and I mean all contributors are doing a great job.

Delayed gratification is a learned art with Open Source, let’s all remember that on both sides.

You’re always welcome to contribute to an open-source project yourself rather than complain that others aren’t doing what you want (for free).

Whether funded by $BIGCORP or run by volunteers in their spare time, you don’t get to dictate how a given FOSS project prioritizes its work. You’re not paying for anything, and so you’re (still) getting what you paid for. Of course, you could rearchitect your own project to switch to another framework or language, but that sure sounds like a lot of work - definitely easier to just demand stuff…

Speaking of, if you think you need python 3.13 today (or freethreading tomorrow, etc.)

That’s a make no sense when the majority of open source projects (especially the big ones) support python 3.13!

It’s not about supporting all its features. It’s only about some works to make it compatible. Note that some open source projects already support python 3.14 while tensorflow need between 6 and 8 months to support it from it official release.

Why should I install specifically python 3.12 for tensorflow while all others support python 3.13?

Also I don’t think such big projects like tensorflow doesn’t get any supports or donations at all.

So all the arguments that you use make no sense.

1. there is no ABI breaking changes in py3.13

2. archlinux team was able to build TF for py3.13 (so it's not a matter of compatibility issues)

it’s just TF team pinning versions for internal google processes and pipelines disregarding opensource community.

That is the same claim you made in https://github.com/tensorflow/tensorflow/issues/78774#issuecomment-2713021735 to which I listed the ABI breaking changes that were breaking the build in https://github.com/tensorflow/tensorflow/issues/78774#issuecomment-2715410042. The same ABI compatibility issues that were addressed in https://github.com/tensorflow/tensorflow/commit/c0093bfb21f0e1157e1892cc8273e10831077174. Points one and two are internally inconsistent if there were no ABI breaking changes why would have to apply tensorflow-2.18.0-python-3.13-API.patch?

Is there any possible release date? I am thinking to use Torch instead.

Approximately, each version released between 3 and 5 months.

Any timeline for this to be fixed / released?

6 months and the python 3.14 will be released and tensorflow support python 3.13 only in nightly

I feel like there should be some simple compatibility test which is only ran once per operating system after each version change for such a popular and important repo.

The build is guaranteed to fail for a new major python release due to a missing requirements file for that major version.

So tf-nightly 2.20 released without support for python 3.13 and few months later python 3.14 will be released.

yes, TF team do this every single release and they tell people that PSF made breaking changes in the new python, when in reality it’s just an incompetent in-house build system problem resulted from pinning the version.

when the RC is released they will close this ticket and pretend it’s fixed. then we will open a new one for python 3.14 then we wait half a year, then close it again.

@learning-to-play

So tf-nightly 2.20 released without support for python 3.13 and few months later python 3.14 will be released.

@medaminezghal, you can simply $ yay python312 to install Python 3.12 on Arch to the path /usr/bin/python3.12, just FYI.

Ref: https://wiki.archlinux.org/title/Python#Other_versions

Code of conduct? Church here is not a religious reference!! It’s a hierarchical management reference used by Eric S. Raymond in his book “The Cathedral and the Bazaar” (abbreviated CatB) which is one of the foundations of OpenSource community (he is the one behind OSI definition).

How come you did not recognize the reference to CatB and OSI? Never heard of it? Am I that old?

https://en.m.wikipedia.org/wiki/The_Cathedral_and_the_Bazaar

On Mon, Jan 6, 2025, 8:19 PM Mihai Maruseac @.***> wrote:

Apologies for the wrong signal sent by 👎. I wanted a quick feedback to signal that you are repeating the same information, in a way that could be construed as aggressive and against the code of conduct https://github.com/tensorflow/tensorflow/blob/master/CODE_OF_CONDUCT.md.

This is not Reddit or similar, so a 👎 has no effect (I got a few myself too, even here). But, taking into account your feedback, I have removed it.

Regarding the rest of your message, I can only reply by repeating what I have already said. In the spirit of making progress here, I will just summarize:

  • Stable release of new Python version is impossible to add after branch cut
  • Testing RCs of new Python version just before release train starts risks delaying releases for everyone and then can lead to issues down the line (e.g., Python 3.11 docker images for some TF versions are on an RC version even now because of this)
  • Release calendar has to take into account multiple priorities and coding freezes. It cannot be shifted around to match the Python release schedule.
  • Nightly support of new Python version can be added, but in general it gets delayed. It is the responsibility of the OSS team to do so and they have to juggle quite a large number of priorities. Please assume the best intentions, there is no one that wants the community to not be supported
  • I have left the TF OSS team in 2022 and have been only helping here and there to smooth the transition. I do not represent the TF team and I don’t know why you are picking on me. I’m just responding to the issue rather than let it stale.

Please make sure to read the code of conduct.

— Reply to this email directly, view it on GitHub https://github.com/tensorflow/tensorflow/issues/78774#issuecomment-2573559656, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKAPK245PH7JUM3DW6AC7D2JK3L7AVCNFSM6AAAAABQTWNUISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNZTGU2TSNRVGY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

it seems that church priests keep down voting me

image

and ignore the community

image

Next release of TF. Branch cut should occur by mid of February

This is not the first time this happens, we had such tickets before and we will continue to have them when PSF release python 3.14

supporting python 3.13 is not the root cause of the problem. there should be a way within TF church to request a build of the current stable of version of TF (no new features) against the current stable version of python without version pinning.

That being said, tf-nightly should have support for a new version of Python much earlier than it does now,

yes, should have, but did not.

I read the whole discussion but I couldn’t find an actual ETA for 3.13 support, do we have one ? thanks

python 3.13 is important because it’s the default and only version in the latest fedora 41 (released 2024-10-29) fedora is a major distro and many users are upgrading to the latest version.

I don’t expect tf to support every distro. but python 3.13 is the latest released stable version from python foundation and is used by a major distro. it would be a shame not to support it. I believe we need to adjust or sync the process.

those releases are scheduled and predictable

There is python 3.12 on Fedora 41, sudo dnf install python3.12

All of those are runtime not build time. Supporting some runtimes is better than supporting zero runtimes.

On Thu, Dec 26, 2024, 9:33 PM Mihai Maruseac @.***> wrote:

the problem that next train is scheduled to be after 6 months

That’s not true. Releases are quarterly, not biannually.

— Reply to this email directly, view it on GitHub https://github.com/tensorflow/tensorflow/issues/78774#issuecomment-2563013286, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKAPKZH7E6IWXG74V6DVFL2HRDYFAVCNFSM6AAAAABQTWNUISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRTGAYTGMRYGY . You are receiving this because you are subscribed to this thread.Message ID: @.***>