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.

James Z
  • 12,209
  • 10
  • 24
  • 44
Programmersd
  • 21
  • 1
  • 7

3 Answers3

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.

LongInt
  • 1,739
  • 2
  • 16
  • 29
1

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

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
DereckChamboko
  • 187
  • 2
  • 6