CMD opens window store when I type python

前端 未结 9 1835
天涯浪人
天涯浪人 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条回答
  •  渐次进展
    2020-11-27 18:35

    I had problems with this as well, where Windows didn't recognize Python or Anaconda in a double click or cmd (command) prompt.

    • Problem: unable to import libraries in "python" cmd in windows. Instead the windows "python" cmd took users somewhere they don't want to go.
    • Problem Cause: In Windows "Environmental Variables", Windows adds a python.exe and python3.exe (I don't know where these link to) in the "%USERPROFILE%\AppData\Local\Microsoft\WindowsApps" directory.

    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

提交回复
热议问题