'Run Spyder 5 Python installation in CMD

Rather than installing a version from python.org, I would like to have the CMD use Spyder 5's python installation.

I have done some digging and as I understand it I need to add python to the "Path" variable of my windows system. After adding the python.exe path C:\Program Files\Spyder\Python\python.exe and also trying C:\Program Files\Spyder\Python to "Path" in Environment Variables it made no difference and I receive the basic error:

> Python was not found; run without arguments to install from the
> Microsoft Store, or disable this shortcut from Settings > Manage App
> Execution Aliases.

As an additional detail I can open python scripts outside of Spyder after having selected "open with" and then selecting the python.exe file which is located in: C:\Program Files\Spyder\Python\python.exe. This is great but I definitely want to be able to run scripts from the CMD. I have also looked at C:\Users\Tech\AppData\Local\Spyder after looking at some my python installations my other machines but no python executables are saved there.

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source