How to Check the Python Version on Your System

Whether you are setting up a new development environment, installing packages, or troubleshooting a script, knowing your Python version is crucial. In this short guide, we will show you how to check the version of Python that is currently installed on your system.

Check Python Version via Command Line

To check the version of Python that is currently installed, you need to use the --version flag alongside the python command in your terminal or command prompt.

Open your command line interface and run the following command:

python --version

This command will display the installed Python version in the output, which will look something like this:

Python 3.9.10

Note: If you have both Python 2 and Python 3 installed on a Linux or macOS system, you might need to use python3 --version to check the version of Python 3 specifically.

Leave a Reply

Your email address will not be published. Required fields are marked *