Update 3: Found it - it's a "helpful" feature of Windows to go find apps via the Windows store (details here).
I installed Anaconda (following a Udacity course) and am trying to get it set up right to run on Windows. The Udacity course assumes I have Git Bash (I don't) and so it's not much help.
I added the following to the path:
- C:\Users\david\anaconda3
- C:\Users\david\anaconda3\Scripts
When I run "conda --version" I get the expected version number. But when I run "python --version" I get:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional>python --version
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional>
When I run "path", it is there:
...
Studio\bin;C:\Users\david\.dotnet\tools;C:\Users\david\AppData\Local\GitHubDesktop\bin;C:\Users\david\anaconda3;C:\Users\david\anaconda3\Scripts;C:\Program Files\JetBrains\PyCharm 2021.1.2\bin;;;C:\Program Files (x86)\Microsoft Visual St
...
And explicitly setting the location of python.exe works:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional>\users\david\anaconda3\python --version
Python 3.8.8
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional>
So why does it not find it when I just run python?
Update: Yes I opened a new command window after saving the additions to the path (always a good question to ask though).
For running where:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional>where python
C:\Users\david\AppData\Local\Microsoft\WindowsApps\python.exe
C:\Users\david\anaconda3\python.exe
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional>
So it finds it under where, but not when trying to run it.
Update 2: Is it possible that Windows does not want to run apps under the c:\users folder for security reasons? It's an unusualy place to put a .exe.
where pythonand see if that's in your path too.