Notification texts go here Contact Us Buy Now!

Which version of Python do I have installed?

Which version of Python do I have installed?

There are several ways to check the version of Python installed on your system:

1. Using the python Command:
python -V

This command displays the version of Python installed on your system. For example, if you have Python 3.9.6 installed, running this command will output:

Python 3.9.6
2. Using the --version Option:
python --version

This command also displays the version of Python installed on your system. It is functionally equivalent to the python -V command.

3. Using the python -VV Command:
python -VV

This command displays the version of Python installed on your system along with additional information, such as the version of the Python interpreter and the location of the Python binary.

4. Using the sys.version Attribute:
python -c "import sys; print(sys.version)"

This command uses the sys.version attribute to display the version of Python installed on your system.

5. Using pyenv (if installed):
pyenv versions

If you have pyenv installed, you can use this command to list all the Python versions installed on your system.

Note: The actual command you need to use to check the Python version may vary depending on your operating system and the way Python was installed. For example, on Windows, you might need to use py instead of python.

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.