-1

I tried typing python3 into cmd but it just brings me to Microsoft Store and wants me to download python from there. See, it's in PATH:

C:\Users\User>PATH
PATH=C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Users\User\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\User\AppData\Local\Programs\Python\Python310\;C:\Users\User\AppData\Local\Microsoft\WindowsApps;;C:\Users\User\AppData\Local\Programs\Microsoft VS Code\bin

martineau
  • 119,623
  • 25
  • 170
  • 301
  • 2
    Type `python` instead of `python3` – Panagiotis Kanavos Jun 16 '22 at 14:18
  • Have you checked [this answer](https://stackoverflow.com/a/58773979/6934388)? – Queuebee Jun 16 '22 at 14:19
  • I strongly recommend to move `C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;` below / right to ``C:\WINDOWS\System32\OpenSSH\`` because of there should be no folder path in __system__ environment variable `Path` before the most important folder path `%SystemRoot%\system32` (and the other folder paths defined by Microsoft by default for Windows). Click on Windows __Start__ button, type on keyboard __environment__ and click on suggested item __Edit the system environment variables__ shown in language of Windows to open the dialog window. – Mofi Jun 16 '22 at 14:36
  • BTW: Do you see `;;` in `PATH` value? This is caused by a bad added folder path to __user__ environment variable `Path`. So I suggest to fix that and remove the semicolon at end of `C:\Users\User\AppData\Local\Microsoft\WindowsApps` or the empty folder path in __user__ environment variable `Path` in same dialog window, too. – Mofi Jun 16 '22 at 14:39

1 Answers1

0

When you use some codes in cmd or vscode doesn't matter, default path would be path that is came from Microsoft Store as I know. So you shall remove your python and download from mstore and try ur code again.

Ramazan E.
  • 27
  • 4