Python versions cmd. Execute command: type python ‐‐version and press Enter.
Python versions cmd Execute command: type python ‐‐version and press Enter. x (or lower), don’t Oct 6, 2023 · How to Check the Python Version on Windows, Mac, and Linux. Method 1: Using python --version. $ Feb 7, 2016 · This simple command works on all operating systems, including Windows, Linux, and MacOS. This command will display the current Python version and the platform it’s running on. Nov 4, 2020 · The simplest way to check Python version is by using the built-in python --version command. Arguably the most common method to check the Python version on a Windows system is the python --version command. This command will show you the Python version installed on your computer. By typing "py -h" or "py --help" I got the help message: C:\Users\admin>py -h Python Launcher for Windows Version 3. Both --version and -V flags display the version of Python that executes when you type ‘python’ in your command prompt or terminal. Hopefully, yours says something like 3. 7. 3. x or higher. Jun 15, 2021 · For Python3 versions enter: python -V in the command line: py -V: print the Python version number and exit (also --version) when given twice -VV, print more information about the build. Type cmd in the Windows search bar and select “Command Prompt” from the results. For some applications you would want to have a latest version and sometimes not. Because accessing the command line prompt or terminal varies from system to system, this part of the tutorial is split across the different operating systems available to you. If so, Python 2 might be displayed by the command mentioned above. These flags are part of Python’s in-built module and they return the version of the python Mar 18, 2025 · Example of Checking Python Version in CMD. # Check Python version C:\>python Mar 9, 2024 · Open the command prompt application: Press the Windows key to open the start screen. "setup. Follow Followed Feb 20, 2024 · Method 1: Using python --version or python -V. 7 and Python 2. NOTE: These commands will display the Python version installed on Apr 23, 2025 · Check the Python version on the command line: --version, -V, -VV. As mentioned earlier, the basic command to check the Python version in CMD is: python --version If you want to create a Python script to check the version and print more detailed information, here's a more elaborate example: May 20, 2014 · If you have Python installed then the easiest way you can check the version number is by typing "python" in your command prompt. This is the most straightforward method to check the Python version. Let us first learn how to check the python version using the various command-line commands used in different operating systems. By Mahesh Makvana. x version -X. Check Python Version Using the Command Line. e. 6. The Python version appears in the next line right below your command. Remember that Python 2 and 3 might be installed on some Linux distributions, such as Ubuntu. Feb 20, 2024 · The desired output is a simple, clear indication of the installed Python version presented in the command line interface. It will show you the version number and if it is running on 32 bit or 64 bit and some other information. Y : Launch the specified Python version The above all default to 64 bit if a Oct 30, 2022 · Let us learn how to check the python version using the command line and scripts. But if it says 2. Another way to check Python version is If you have Homebrew installed on your Mac, you can run the following command on the Terminal: brew install python After the process completes, your computer will have the latest version of Python 3. 2. 1013 usage: py [launcher-args] [python-args] script [script-args] Launcher arguments: -2 : Launch the latest Python 2. 1150. Dec 15, 2023 · Since most Linux versions now use Python 3 by default, we use python3 in the command syntax. However, if you still use Python 2 for some applications, omit 3 from the command to check which Python 2 version you have installed. Open your terminal and use this simple check Python version command: For Python 2: python --version or python -V. Use the following command to see what version of Python 3 is installed: Python 3 --version Feb 2, 2024 · To check the installed Python versions using the Command Prompt, follow these steps: 1. For Python 3: python3 --version or python -V. enter py -h to check other parameters Apr 22, 2025 · The command line provides a straightforward way to get the Python version. 5. x version -3 : Launch the latest Python 3. version. How to Check Python Version in Windows. You can verify this by running the command: python3 --version Nov 19, 2020 · So, let’s discover how you can check your Python version on the command line and in the script on Windows, macOS, and Linux systems. py install" for certain packages don't recognize the "i May 30, 2024 · To check the Python version from the command prompt (CMD), follow the below steps. Windows installations do not come with Python preinstalled. I don't know what went wrong, but nothing related to Python seems to work any more. This straightforward command queries the Python executable to display the I just got the answer. Assuming you have Python installed, and the terminal open, you can check your current Python version with the following command: $ python --version Python 2. Once the Command Prompt is open, type python --version; It will display the version of python. May 17, 2025 · python --version. Mar 28, 2022 · To check the version that your Python interpreter is running we can use a version command on the python command. This command will display the version of Python installed on your system. g. 16. 5 (default, Nov 4 2020, 14:07:56) [GCC 9. With its simple syntax, high productivity, and amazing open-source libraries, Python can be used for just about anything . Click on the command prompt application. In the Command Prompt window, type "python --version" and press Enter. Here’s an example output: Python 3. 1 20200927] on linux Method 2: sys. 8. Open the Command Prompt on your Windows computer. Check Python Version Mac (Exact Steps). In the search box type “command”. Check Python Version: Command-Line. Open the Command Prompt by pressing the Windows key + R, typing "cmd," and pressing Enter. 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. Python is one of the most popular programming languages. i) Windows: In Windows operating systems, we can use the command python --version to check the python I installed both Python 2. Updated Oct 6, 2023. xdaiizsiaauuxtmuudvditfjcgwnzltfgzfcggaer