Check python versions. How to Check Python Version on Windows and Mac.

Check python versions To check what version of Python is installed on your Windows, Mac, or Linux computer, all you have to do is run a single command. To view the Python 3 version, run "Python3 --version" instead. version` attribute and the `python --version` command. py) and run it using Python: python python_version. 7-32, and Python 3. Python ranked fourth in popularity in the Stack Overflow 2020 Developer Survey. How to Check Python Version in Linux, Mac, & Windows. x series, while the python3 command is assigned to the Python 3. x series. Script: import sys print(“Python version:”, sys. Python 3 includes "py" and "pyw" which helps me to easily start different Pythons, for example: If Python is installed on your computer, here’s how you can find the version quickly. To check the Python version on Windows or Mac system, we can follow these methods: Using the Command Prompt/Terminal; Checking in the Interactive Shell Oct 6, 2023 · To check the Python version on Windows, Mac, or Linux, type "python --version" into PowerShell on Windows, or the Terminal on Linux or Mac. version) Save this script to a file (e. Apr 22, 2025 · In this guide, we'll explore various straightforward methods on how to check the Python version on your Linux, Windows, and Mac systems. py. In some environments, the python command is assigned to the Python 2. 7-32. Apr 23, 2025 · Run the python or python3 command with the --version or -V option in the Command Prompt (cmd) on Windows or the Terminal on macOS and Linux. How to Check Python Version on Windows and Mac. Nov 4, 2020 · Learn how to quickly and easily check your Python version in just a few steps. This will print your Python version to the console. 7-64, Python 2. . Our guide covers the different ways to check, including using the built-in `sys. I've installed several versions of Pythons on my Windows computer, for example Python 2. , python_version. May 21, 2025 · If you prefer a graphical interface or need to check the Python version programmatically, you can write a simple Python script. g. oqi ndlxn pzacvwm ewte nmaazxw uex krzvt xfiwx sga nvkguq