Python – Using “python –version” command bringing up error message

pandaspythonshellversion

I have Python 3.7.1 on my Windows 10 PC. I want to install Pandas and firstly need to do some checks to see if I have everything required. I tried typing the following to double check the Python version:

python --version

but it keeps spitting out the error:

Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
NameError: name 'python' is not defined

According to the Pandas website, if this error occurs it's because I need to type it into Python Shell. But that's what I'm doing… I know I'm probably missing something really obvious, but I'd really appreciate any hints and tips for this very basic problem…

Thanks!

Best Answer

You shouldn't be entering python --version in a Python shell. Enter it in the cmd.exe shell.