1

While i write

python --version

I get nothing as a result in command prompt. I should get the version details of python, correct? how to rectify it?

Its the same for pip also, which file to download and how to install them, .whl or .grz? The guide shows method using pip --version which again is not working in cmd at the first place.

10
  • "I get nothing as a result". That seems rather unlikely. Are you saying that you open a cmd window, type in what you have, hit enter, and that nothing is displayed on screen except the command prompt? Commented Nov 18, 2019 at 16:28
  • 1
    Exactly, when i type 'python - - version', hit enter, control goes to next line ready for next command... Commented Nov 18, 2019 at 17:14
  • 1
    it rather opens microsoft app store Commented Nov 18, 2019 at 17:32
  • I believe that means you don't have python installed. Commented Nov 18, 2019 at 17:37
  • I have python installed, it's 3.7. Also this python is the interpreter in pycharm! Commented Nov 18, 2019 at 17:49

3 Answers 3

2

You did not say how your issue was solved, so I had to figure it out myself. My problem was a 0kb Python.exe in the WindowsApps folder, which is in the PATH environmental variable. I just deleted that file, and everything worked.

Sign up to request clarification or add additional context in comments.

1 Comment

I am sorry, it worked just on a restart. Some cache problems maybe.
2

I found entering python --version in terminal didn't work either, but entering py --version did.

1 Comment

same for me. python exe in path etc by python --version is blank, py --version shows correct version.
0

Had the same problem. I fixed the problem by adding the python.exe directory to environment variables

Open System Properties (Right click Computer in the start menu, or use the keyboard shortcut Win+Pause)
Click Advanced system settings in the sidebar.
Click Environment Variables...
Select PATH in the System variables section
Click Edit

Add Python's path to the end of the list (the paths are separated by semicolons). For example:

C:\Windows;C:\Windows\System32;C:\Python27

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.