0

I have just installed python3.8 and sublime text editor. I am attempting to run the python build on sublime text but I am met with "Python was not found but can be installed" error.

Both python and sublime are installed on E:\

When opening cmd prompt I can change dir and am able to run py from there without an issue.

I'm assuming that my sublime is not pointing to the correct dir but don't know how to resolve this issue.

Soto
  • 15
  • 1
  • 7

2 Answers2

0

This isn't a Sublime issue, it's a Windows 10 issue. My Windows 10 boxes don't have this feature so I'm not sure how widely spread it is, but you may want to check out this (seemingly unrelated) question "Permission Denied" trying to run Python on Windows 10.

The general gist from this post is that these new stub redirectors are supposed to direct you into installing some missing applications from the Windows App store and that user-installed versions are supposed to take priority, but depending on how the PATH is modified the system might find the stub versions before your user installed versions.

The currently accepted answer mentions:

The second part of correcting it is to type "manage app execution aliases" into the Windows search prompt and disable the store versions of Python altogether.

It's possible that you'll only need to do the second part, but on my system I made both changes and everything is back to normal now.

In the comments, there are comments from Zooba which further indicate that this is the way to go:

(Microsoft employee and CPython core developer here) You definitely only need to do the second part. There have been a couple of bugs related to upgrading apps resetting aliases which will be fixed in the next stable update, so it should be a one-time fix by then. While you're getting Insiders updates you may need to do it a couple more times.

... And launching the Store is a new feature to help people install Python - if you've added it to PATH using the regular installer it should take precedence over the new redirector, but if not you've discovered above how to disable it.

Community
  • 1
  • 1
OdatNurd
  • 17,225
  • 3
  • 36
  • 50
  • I had tried a handfull of fixes to no avail. So I just ended up downloading python again through the windows store and that resolved the issue. – Soto Feb 05 '20 at 17:31
  • Glad you got it solved eventually. Unfortunately none of the Windows 10 machines that I have access to have this particular "feature" so I'm not sure why it may not have worked. – OdatNurd Feb 05 '20 at 18:24
-2

i had the same problem, so i went to the microsoft store (windos 10) and simply installed "python 3.9" and problem was gone! sorry for bad english btw