Posted by on 2017年6月26日

Python not recognized

If we want to make our Sublime Text 3(A.K.A. ST3) a light IDE for Python, we can use Anaconda Pythob IDE Package.

  1. Use Ctrl+` to show Console.
  2. Install Package Control on Sublime Text 3 under the Tutorial.
  3. Download Anaconda Package of Sublime via Package Control on ST3:
    Enter Command Palette through ctrl+shift+p
    Type Package Contorl: Install Package or ip,press Enter.
    Search Anaconda and download.
  4. Relauch your ST3, you can build you Python file with Ctrl+B.

However, if your default Python path is not under C:\Python27 for some reason (Such as you download your Python via Anaconda powered by Continuum), you may get the error like Python is not recognized.Then you need to set your Environment Variable

  1. Check the path of your Python.exe file (If you already installed Anaconda, I think Python.exe might be under the directory of Anaconda)
  2. Follow the instruction below to add your path of Python.exe to the Environment Variable:
    a. From the desktop, right-click My Computer and click Properties.
    b. In the System Properties window, click on the Advanced tab.
    c. In the Advanced section, click the Environment Variables button.
    d. Highlight the Path variable in the Systems Variable section and click the Edit button.
    f. Add the path of your python executable(the path of Anaconda). Each different directory is separated with a semicolon. (Note: do not put spaces between elements in the PATH. Your addition to the PATH should read like ;c:\Python27 NOT ; C\Python27)
    g. Apply the changes. You might need to restart your system, though simply restarting cmd.exe should be sufficient.
    h. Launch cmd and try Python command again. It should work.

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)


Be the first to comment.

Leave a Reply