![]() ![]() To check which Python version is running, you can use either the sys or the platform module. This is especially useful when you have multiple Python versions installed on your computer. Sometimes you may want to check the version of Python when you are coding an application (i.e. Starting from Python 3.6, you can also use python -VV (this is two Vs, not a W) to get more detailed information about your Python version: This number is 3 in our case, which means that we have Python 3 installed on our computer. This is indicated by the first number of the full version number. Usually, we are interested in the major version – Python 2 or Python 3. In this case, the full version number is 3.8.3. However, the number next to Python is the version number, which is what we are looking for. You’ll get a result like this:ĭepending on your Python distribution, you may get more information in the result set. Then, for any of the operations systems above, you simply type python -version OR python -V, on the command line and press Enter. Let’s first recall how we can access the command line in different operating systems. You can easily check your Python version on the command line/terminal/shell. Let’s see how you can check the Python version. So, you should definitely know the version of Python installed on your computer. If the application is written in Python 2, you may not be able to run it using Python 3. ![]() The difference between these two versions is quite significant – it’s not just about fixing some bugs and adding a few new features. However, you might have seen that some people use Python 2, while others prefer Python 3. With its simple syntax, high productivity, and amazing open-source libraries, Python can be used for just about anything. Python is one of the most popular programming languages. 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. Although they are two versions of the same language, they have different syntax code written in Python 3 might not work in Python 2. Chances are you have heard about Python 2 and Python 3.
0 Comments
Leave a Reply. |