-2

I was normally using python3.7.3 on my system(Windows 10). A couple of days earlier I noticed that the command prompt won't run any of my python programs. It did nothing, no response. I thought there is a problem displaying the output stream so I ran an infinite loop(and was expecting to terminate the process, ctrl^c) but again no response. Even python --version command won't work. I uninstalled python3.7.3, downloaded the latest python3.8.5, and again the same problem. image from my cmd line

please help me out. I use sublime text so I prefer running my codes through cmd.

Update: Here is another snap of my command line after running commands in one answer and comments.

Also, I think the problem lies within the PATH setting but PATHs are already added. image to enviornment variables, image to system variables

  • What does `where python` give you? – Axe319 Sep 01 '20 at 17:20
  • Perhaps https://stackoverflow.com/questions/56974927/permission-denied-trying-to-run-python-on-windows-10 will offer some insight. – Anon Coward Sep 01 '20 at 17:25
  • I suspect from your description that you have created an empty file called `python.cmd` or (less likely) `python.bat` that is in a folder that comes earlier in the path than your Python installation folder. It's easier to do that accidentally than you might imagine. Search your entire system for `python.*` and see what it turns up. – BoarGules Sep 01 '20 at 17:47
  • ```where python``` gives the exact location of my python.exe file. – Aditya Hugay Sep 02 '20 at 09:25
  • And it also includes the windows store stub python executable. You'll need to remove it following the directions on the linked question. – Anon Coward Sep 03 '20 at 01:03

1 Answers1

0

It is possible you failed to add python to your path in the installer.

Image displaying adding python to your path in the installer

You also may have forgotten to disable the path limit in the final set up screen.

Image displaying increase path limit in the installer

If you navigate to C:\Users\chira\AppData\Local\Programs\Python\Python38-32 then run python --version do you get any output?

  • Yes, ```python --version``` works in ```C:\Users\chira\AppData\Local\Programs\Python\Python38-32```. ```python 3.8.5``` is the output I get. – Aditya Hugay Sep 02 '20 at 08:27
  • I remember I checked 'add python3.8 to PATH'. But I didn't disable the path limit in the final set up screen. I thought it is better to leave it that way, could this be causing the issue? – Aditya Hugay Sep 02 '20 at 08:32
  • add the folder containing python (`C:\Users\chira\AppData\Local\Programs\Python\Python38-32`) to the path [relevant guide](https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/) – Luke Murray Sep 02 '20 at 14:29