Debian 默认是自带 Python 的,但具体情况随时间版本有所不同:
/usr/bin/python 指向 python2)。python 命令(Python 2)python3 命令可用,但 python 通常不存在(除非手动安装)python3 --version
which python3
python 命令可以手动安装:
sudo apt update
sudo apt install python-is-python3
这样 python 就会指向 python3。
✅ Debian 自带 Python 3
❌ 不自带 Python 2(新版本)
⚠️ 新系统没有 python 命令,只有 python3
如果你是准备做开发、运维或兼容性相关的事情,可以告诉我你的 Debian 版本,我可以给你更具体的建议。