How can I check my python version in cmd?

Question:

I has downloaded python in python.org, and I wanted to check my python version, so I wrote python --version in cmd, but it said just Python, without version. Is there any other way to find out python version?

Asked By: New Programmer

||

Answers:

A way to do it is to actually start the python interpreter.
You can do that with python command. This will start the repl and you will be able to see in the first line something like:

Python 2.7.18 (default, Mar  8 2021, 13:02:45) 

Or

Python 3.8.5 (default, Jan 27 2021, 15:41:15) 

Please check in the comments other valid ways to do it.

I am really curious on what is the root cause of your issue tho.

Answered By: Karolos K.

If you typed the python command into the cmd and it did not show the currently installed version of py then you may double-check that python is added to your environment variables. (assuming that python is successfully installed on your machine).

Answered By: Amr Ramadan
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.