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
- switch to nightly until https://github.com/tensorflow/tensorflow/issues/78774 — committed to representational-alignment/thingsvision by eringrant a year ago
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:
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.
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:
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!
@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:
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).
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
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:
Please make sure to read the code of conduct.
So, two things:
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.
For a pure Python package, I agree. And then a PR with a new
requirements.txtcould 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.
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.txtand then in the new environmentpip install -r requirements.txt@VedeshP why don’t you dump the venv with
pip freezeto arequirementx.txtfile? You may also usepipreqsif 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-nightlyshould already support 3.13, it’s not really ok to delay adding support to it for so long.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.
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.
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.
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?
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
https://pypi.org/project/tf-nightly/2.20.0.dev20250413/#files has wheels for Python 3.13
The build is guaranteed to fail for a new major python release due to a missing requirements file for that major version.
@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 python312to 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:
it seems that church priests keep down voting me
and ignore the community
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.
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
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: