'(WinError 2) The system cannot find the file specified on Sublime Text

Trying to run simple Python code on Sublime Text editor but getting the following error:

[WinError 2] The system cannot find the file specified
[cmd: ['py', '-u', 'C:\\Users\\Administartor\\Desktop\\Python projects\\test.py']]
[dir: C:\Users\Administartor\Desktop\Python projects]
[path: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Users\Administartor\anaconda3;C:\Users\Administartor\anaconda3\Library\mingw-w64\bin;C:\Users\Administartor\anaconda3\Library\usr\bin;C:\Users\Administartor\anaconda3\Library\bin;C:\Users\Administartor\anaconda3\Scripts;C:\Users\Administartor\AppData\Local\Microsoft\WindowsApps;C:\Users\Administartor\AppData\Local\Programs\Microsoft VS Code\bin;]
[Finished]

When I type Python in the command prompt I get the following message

Python 3.9.7 (default, Sep 16 2021, 16:59:28) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32

Warning:
This Python interpreter is in a conda environment, but the environment has
not been activated.  Libraries may fail to load.  To activate this environment
please see https://conda.io/activation

Type "help", "copyright", "credits" or "license" for more information.

I checked many other threads about this but I still can't find a solution to this problem.

I also have Jupyter notebook and Visual Studio Code and they are working without problems



Sources

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

Source: Stack Overflow

Solution Source