Python / pip

Python / pip: py --version — Windows

Print the Python version selected by the launcher.

Availability: Third-party software; install and version dependent.中文

Syntax

py --version

Examples

Print the Python version selected by the launcher.

py --version

Parameters, options and clauses

Option / clauseDescription
--version / -VPrint the selected Python interpreter version.
-0p / --list-pathsList installed runtimes and their paths where supported by the Python launcher.
-3[<version>]Select a Python 3 runtime where multiple versions are installed.
Safety note

Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.

Official reference ↗Back to directory