Introduction
Python is a popular programming language that is widely used for various purposes such as web development, data analysis, artificial intelligence, and more. It is important to know the version of Python installed on your system as different versions may have different features and compatibility requirements. In this article, we will guide you on how to check the version of Python installed on your Windows, macOS, and Linux systems using a quick and easy command.
Checking Python Version on Windows
To check the version of Python installed on your Windows system, you can follow these steps:
1. Open the command prompt by pressing the Windows key + R, typing «cmd» in the Run dialog box, and pressing Enter.
2. In the command prompt, type the following command and press Enter:
python –version
This command will display the version of Python installed on your system. For example, if you have Python 3.9.2 installed, it will display «Python 3.9.2».
Checking Python Version on macOS
To check the version of Python installed on your macOS system, you can follow these steps:
1. Open the Terminal by going to Applications > Utilities > Terminal.
2. In the Terminal, type the following command and press Enter:
python –version
This command will display the version of Python installed on your system. For example, if you have Python 3.9.2 installed, it will display «Python 3.9.2».
Checking Python Version on Linux
To check the version of Python installed on your Linux system, you can follow these steps:
1. Open the terminal by pressing Ctrl + Alt + T.
2. In the terminal, type the following command and press Enter:
python –version
This command will display the version of Python installed on your system. For example, if you have Python 3.9.2 installed, it will display «Python 3.9.2».
Conclusion
Knowing the version of Python installed on your system is essential for ensuring compatibility and utilizing the latest features of the language. In this article, we have provided you with a quick and easy command to check the version of Python on Windows, macOS, and Linux systems. By following the steps outlined in this article, you can easily determine the version of Python installed on your system and proceed with your programming tasks accordingly.