Linux command
py3versions 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
List installed Python 3 versions
py3versions -i
Show supported versions
py3versions -s
Show default version
py3versions -d
Show version numbers only
py3versions -v -i
说明
py3versions reports information about Python 3 interpreter versions available on Debian and Ubuntu systems. It distinguishes between installed versions, supported versions for the distribution, and the default version used by the system. The tool is part of Debian's python3-minimal package and is primarily used by packaging tools and maintainer scripts to determine which Python versions to compile against or clean up. The -i flag shows installed versions, -s shows supported versions, and -d shows the default. The supported list is ordered lowest to highest with the default version last.
参数
- -i, --installed
- Show installed supported python3 versions.
- -s, --supported
- Show supported python3 versions for this distribution.
- -d, --default
- Show the default python3 version.
- -r, --requested
- Read the X-Python3-Version field from debian/control and show matching versions.
- -v, --version
- Limit output to version numbers only (e.g., 3.10 instead of python3.10).
FAQ
What is the py3versions command used for?
py3versions reports information about Python 3 interpreter versions available on Debian and Ubuntu systems. It distinguishes between installed versions, supported versions for the distribution, and the default version used by the system. The tool is part of Debian's python3-minimal package and is primarily used by packaging tools and maintainer scripts to determine which Python versions to compile against or clean up. The -i flag shows installed versions, -s shows supported versions, and -d shows the default. The supported list is ordered lowest to highest with the default version last.
How do I run a basic py3versions example?
Run `py3versions -i` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -i, --installed do in py3versions?
Show installed supported python3 versions.