Python is one of the most popular programming language, you may want to know what version of Python has been installed on your system, in this article we will check how you can identify that,
Table of Content:
- How to check installed Python version in Windows OS?
- How to check installed Python version in macOS?
- How to check installed Python version in Linux?
- Unknown Option: -e Error while checking Python version
How to check installed Python version in Windows OS?
- How to check installed Python version in Windows OS?
- How to check installed Python version in macOS?
- How to check installed Python version in Linux?
- Unknown Option: -e Error while checking Python version
How to check installed Python version in Windows OS?
If you are on a Windows Operating system, you can try the below steps,
- Press Ctrl + R to Open RUN and type CMD or Powershell or Bash to open Terminal/Command Prompt.
- Now type python -V or python --version
C:\Users\pythonDev>python --version Python 3.8.6rc1
C:\Users\pythonDev>python --V Python 3.8.6rc1
So as you can see I am using 3.8.6 where 3 => Major version, 8 => Minor version and 6 => Macro Version, rc stands for release candidate (yet not released for production use)
- You can also use Python Shell to get more details:
Python 3.8.6rc1 (tags/v3.8.6rc1:08bd63d, Sep 7 2020, 23:10:23) [MSC v.1927 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license()" for more information. >>> import sys >>> print(sys.version) 3.8.6rc1 (tags/v3.8.6rc1:08bd63d, Sep 7 2020, 23:10:23) [MSC v.1927 64 bit (AMD64)]
Note: If you are using Windows 10 and you do not have Python installed on your System, just type python in command prompt at it will open up Microsoft Store with Python 3.8 page were you can easily get Python installed.
Python -V was introduced in Python 2.5+, so if you are using older version, this command may not work!
-V : print the Python version number and exit (also --version)
when given twice, print more information about the build
How to check installed Python version in macOS?
⛏️ Python comes pre-installed with macOS, so you do not need to install it separated unless you want to upgdare to a new version, or have to use multiple python versions at a time.
- Go to Finder -> Application -> Utilities
- Open Terminal
- Type python --version or python -V to check the version:
pythonDev: $ python --version Python 3.8.1
How to check installed Python version in Linux?
⛏️ Again like macOS, Python usually comes pre-installed with latest versions of Linux flavours, so you do not need to install it separately unless you want to use multiple python versions at a time.
- Open Terminal: You can do that by pressing Ctrl + Alt + T key combinations
- Type python --version or python -V to check the version:
linuxBox: $ python --version Python 3.8.7
Unknown Option: -e Error while checking Python version
If you type the command incorrectly, single hyphen instead of two you will get the below message!
C:\Users\pythonDev>python -version
Unknown option: -e
usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.
Comments:
- This was helpful... Thanks
user: anonymous 03 Oct 2020 11:10:28 GMT
- Further comments disabled!
- Read JSON File in Python Program
- Convert Float to String in Python
- Python - Convert float to String
- Check if String Contains a Substring - Python
- Install and Run Jupyter Notebook on Mac (macOS)
- Sorting an array using Bubble Sort in Python Programming
- Comments in Python Programming
- 3 Python program to add two numbers
- Read a file line by line in Python Program
- How to uninstall pip Python packages
- Change label (text) color in tkinter
- 7 Python Arithmetic Operators with Examples [Tutorial]
- pip get list of all outdated Python packages
- Where does brew install python in macOS
- How to Convert String to DateTime in Python
- Python: Fix command not found pip or pip3 on zsh shell
- How to add borders to tkinter label text
- ModuleNotFoundError: No module named qdarkstyle.colorsystem [Python]
- TypeError: must be str, not int
- Python Program To Calculate Simple Interest (SimpleInterest.py)
- Check version of pip package installer for Python
- Change the background of Tkinter label or text
- Set width and height for the label in tkinter
- How to write JSON file in Python Program
- Python raise error with message example
- Country ISO Codes List - Java
- SQLite with Android Easy to Understand Tutorial that covers Select, Insert, Update and Delete - Android
- Amp Hello World Example - AMP
- Android : Exception raised during rendering: action_bar API 22 - Android
- 3 Python program to add two numbers - Python
- How to install powershell on macOS - Powershell
- Remove ActionBar from Activity that extends appcompat-v7 - Android
- The service instance - SharePoint