Today when I tryed to run a simple code on Sublime Text 3, the following message appeard:
Python was not found but can be installed from the Microsoft
Adding a bit to the question. Even when I typed pip freeze
, it wasn't showing anything.
Here's what I did:
There were multiple instances for python app in /AppData/Local/Microsoft/WindowApps
.
Delete those and then it works.
As a person who does Python development in Sublime Text, I know you said the python path was correct but when you install python make sure to tick the option to add Python to PATH.
I had the same issue back in the day til I did this.
I had problems with this as well, where Windows didn't recognize Python or Anaconda in a double click or cmd (command) prompt.
Solution: I tried deleting the python*.exe files in the WindowsApp directory, but windows wouldn't allow it, so I opened a command prompt in the "%USERPROFILE%\AppData\Local\Microsoft\WindowsApps" directory, typed:
del python.exe
del python3.exe
Then I created a environment variables linking to the installed python link, in my case was C:\Anaconda3; C:\Anaconda3\Scripts and some others for good measure