If you want to know which Python version has been installed on your device using the Terminal running the bash shell you can make use of the python or python3 followed by the --version flag.
Example:
$ python3 --version
Python 3.11.4
$ python --version
Python 2.7.1
Note: If Python 2 is not installed on your device, you will get an error.
bash: python: command not found

Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!