CMD opens window store when I type python

前端 未结 9 1842
天涯浪人
天涯浪人 2020-11-27 17:31

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

9条回答
  •  萌比男神i
    2020-11-27 18:11

    The main problem here is that the order in the path calls the windows from top to bottom, and that there is python.exe in %USERPROFILE%\AppData\Local\Microsoft\WindowsApps which is called first if there are no other python.exes in the PATH above that line.

    To ensure that the correct python.exe is called, add the python installation folder (containing python.exe) to the PATH, above %USERPROFILE%\AppData\Local\Microsoft\WindowsApps

    Here is an example:

    • To get to this location, click "Start" -> start typing "Env" -> Select "Edit the system environment variables" -> "Environment variables" -button -> Select the entry for "Path" in the upper list -> Click "Edit".

    enter image description here

    • Python components should be at the top, as in step 5. If not, move up by pressing the button in step 6.

提交回复
热议问题