Debian 的各个版本几乎都支持 Python,因为 Python 是 Debian 系统中非常重要且默认包含的基础组件之一。下面按时间线和版本给你一个清晰说明:
Python 2
python2Python 3
python3| Debian 版本 | 代号 | 默认 Python | 备注 |
|---|---|---|---|
| Debian 9 | Stretch | Python 2.7 / 3.5 | 旧版本 |
| Debian 10 | Buster | Python 2.7 / 3.7 | Python 2 最后支持版 |
| Debian 11 | Bullseye | Python 3.9 | 移除 Python 2 |
| Debian 12 | Bookworm | Python 3.11 | 当前稳定版 |
| Debian 13 | Trixie(测试/未来) | Python 3.12+ | 开发中 |
✅ 结论:Debian 11、12 及以后版本只支持 Python 3
python3 --version
或查看所有已安装 Python:
ls /usr/bin/python*
apt + 第三方源(如 deadsnakes 仅 Ubuntu)pyenv所有主流 Debian 版本都支持 Python;新版本只支持 Python 3,旧版本(≤10)才支持 Python 2。
如果你有具体需求(比如:
可以告诉我,我可以给你更针对性的建议。