Reputation: 657
so I've installed Python in my desktop, and tried to figure out the version. So in the command prompt, I typed python --version
. But I got Python
and that's it. What have I done wrong? Below is the demonstration.
C:\Users\ryanoh>python --version
Python
I've tried the same thing in the directory where Python is installed, but it gives exactly the same result. Just as below.
C:\Users\ryano\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.9>python --version
Python
``
Upvotes: 0
Views: 515
Reputation: 26
I am having the same problem, although I can not remember explicitly installing Python.
I suspected that I should have a copy of an interpreter when I've installed Visual Studio with Python workload. It turns out I don't have Visual Studio, but Visual Studio Code.
When I've ran python --version
in the command line I got no error and the only output was the word "Python". I've searched in My Computer for the "python" string and got nothing.
I also tried a script with the following commands:
import sys
print("Python version")
print (sys.version)
print("Version info.")
print (sys.version_info)
But I got the same output.
My conclusion is that I simply don't have Python installed or there is some let say pseudo Python stub in the OS I am using.
I am using Windows 10 Home edition.
Hope this helps.
Upvotes: 1