close

How can I check all the installed Python versions on Windows?

Hello Guys, How are you all? Hope You all Are Fine. Today We Are Going To learn about How can I check all the installed Python versions on Windows in Python. So Here I am Explain to you all the possible Methods here.

Without wasting your time, Let’s start This Article.

Table of Contents

How can I check all the installed Python versions on Windows?

  1. How can I check all the installed Python versions on Windows?

    I just got the answer. By typing “py -h” or “py –help” I got the help message:
    C:\Users\admin>py -h Python Launcher for Windows Version 3.7.1150.1013

  2. I check all the installed Python versions on Windows

    I just got the answer. By typing “py -h” or “py –help” I got the help message:
    C:\Users\admin>py -h Python Launcher for Windows Version 3.7.1150.1013

Method 1

I just got the answer. By typing “py -h” or “py –help” I got the help message:

C:\Users\admin>py -h
Python Launcher for Windows Version 3.7.1150.1013

usage:
py [launcher-args] [python-args] script [script-args]

Launcher arguments:

-2     : Launch the latest Python 2.x version
-3     : Launch the latest Python 3.x version
-X.Y   : Launch the specified Python version
     The above all default to 64 bit if a matching 64 bit python is present.
-X.Y-32: Launch the specified 32bit Python version
-X-32  : Launch the latest 32bit Python X version
-X.Y-64: Launch the specified 64bit Python version
-X-64  : Launch the latest 64bit Python X version
-0  --list       : List the available pythons
-0p --list-paths : List with paths

Which tells me that “-0” (zero, not letter “O”) lists the available pythons:

C:\Users\admin>py -0
Installed Pythons found by py Launcher for Windows
 -3.7-64 *
 -3.7-32
 -2.7-64
 -2.7-32

While “-0p” lists not only the versions, but also the paths:

C:\Users\admin>py -0p
Installed Pythons found by py Launcher for Windows
 -3.7-64        C:\Users\admin\AppData\Local\Programs\Python\Python37\python.exe *
 -3.7-32        C:\Users\admin\AppData\Local\Programs\Python\Python37-32\python.exe
 -2.7-64        C:\Python27_64\python.exe
 -2.7-32        C:\Python27_32\python.exe

Method 2

As I got from running python -2,

Requested Python version (2) not installed, use -0 for available pythons PS C:\Users\ASUS> py -0 Installed Pythons found by C:\Windows\py.exe Launcher for Windows -3.9-64 *

As in, use command py -0

Summery

It’s all About this issue. Hope all Methods helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which Method worked for you? Thank You.

Also, Read