Linux command
pyversions 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
List installed Python versions
pyversions -i
Show supported versions
pyversions -s
Show default version
pyversions -d
Show requested versions
pyversions -r
说明
pyversions is a Debian-specific helper that reports information about Python 2 interpreter versions available on the system. It lists installed versions, the default version, the versions supported by the current Debian release, and the versions a source package requests via its X-Python-Version field in debian/control. It is used by Debian's Python packaging infrastructure (debhelper, dh_python2) to drive build-time decisions. The Python 3 counterpart is py3versions, which is the tool you should use today; pyversions itself was retired together with Python 2 in Debian 11 (bullseye) and removed from later releases.
参数
- -i, --installed
- List installed Python versions.
- -s, --supported
- List Python versions currently supported by the running Debian release.
- -d, --default
- Print the default Python version (target of /usr/bin/python).
- -r, --requested _pkg_|_setup.py_|_debian/control_
- Print the Python versions requested by a package source (defaults to the debian/control in the current directory).
- -v, --version
- Combined with one of the above, also print the corresponding interpreter path.
FAQ
What is the pyversions command used for?
pyversions is a Debian-specific helper that reports information about Python 2 interpreter versions available on the system. It lists installed versions, the default version, the versions supported by the current Debian release, and the versions a source package requests via its X-Python-Version field in debian/control. It is used by Debian's Python packaging infrastructure (debhelper, dh_python2) to drive build-time decisions. The Python 3 counterpart is py3versions, which is the tool you should use today; pyversions itself was retired together with Python 2 in Debian 11 (bullseye) and removed from later releases.
How do I run a basic pyversions example?
Run `pyversions -i` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -i, --installed do in pyversions?
List installed Python versions.