- Package:
- src:pytorch
- Source:
- src:pytorch
- Submitter:
- Andrius Merkys
- Date:
- 2026-01-13 19:49:00 UTC
- Severity:
- normal
- Tags:
Hello, Currently pytorch builds for the default Python version only. This causes build failures for reverse dependencies which build for all supported Python versions, for example python-array-api-compat and pytorch-geometric [1]. [1] https://lists.debian.org/debian-ai/2023/12/msg00014.html Andrius
I tried this and it turns to be a little bit complicated to support. The code change can be found in the git history, which was reverted by me. The problem is that the file libtorch_python.so.* is specific to one python version, and cannot be shared between py3.11 and py3.12. One of them will break if we do setup.py for both versions. https://github.com/pytorch/pytorch/issues/56046 Upstream is not interested to fix this since libtorch_python.so is already big enough (25MB). I don't want to spend my time for simultaneously supporting multiple python versions anymore. And I don't see any problem by only supporting the default python version. A couple of lines of code change can limit reverse dependencies to a single python version. Patch is appreciated if anybody can make it work. Make sure that both py3.11 and py3.12 `import torch` works correctly.
Hi, Thanks a lot for giving this a shot. This means that all reverse dependencies of pytorch will have to support default Python only. Best wishes, Andrius
That’s too bad. This is causing problems for pyinstaller’s test suite: https://salsa.debian.org/python-team/packages/pyinstaller-hooks-contrib/-/ jobs/8880569#L2806
That’s too bad. This is causing problems for pyinstaller’s test suite: https://salsa.debian.org/python-team/packages/pyinstaller-hooks-contrib/-/ jobs/8880569#L2806