Sublime Forum

No Build System: Python, Windows 10 64 Bit

#1

Trying to compile code through Python 3.6.4 (Python 36-32). Getting this error when selecting ‘Python’ in Build System and running:

‘python’ is not recognized as an internal or external command,
operable program or batch file.
[Finished in 0.1s with exit code 1]
[shell_cmd: python -u “E:\Henry.py”]
[dir: E:]
[path: C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Intel\Intel® Management Engine Components\DAL;C:\Program Files\Intel\Intel® Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel® Management Engine Components\IPT;C:\Program Files\Intel\Intel® Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn;C:\Program Files\Microsoft SQL Server\120\Tools\Binn;C:\Program Files\Microsoft SQL Server\120\DTS\Binn;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\MATLAB\R2017a\runtime\win64;C:\Program Files\MATLAB\R2017a\bin;C:\Program Files\MATLAB\R2016b\runtime\win64;C:\Program Files\MATLAB\R2016b\bin;C:\Program Files\Calibre2;C:\Users\hmacanas\AppData\Local\Microsoft\WindowsApps;]

Also, when i created a new build system all that appeared was the text ‘No Build System’

0 Likes

#2

This error is telling you that Windows doesn’t know how to find a program named python, which is causing the build to fail.

The two most common reasons for this are:

  1. You did not install Python on your computer
  2. You installed Python, but you didn’t tell the installer to add it to the PATH.

It’s a common misconception that because Sublime is extensible in Python that it also includes Python, but this is not the case. Sublime has it’s own private Python interpreter embedded within it, but it’s not available for running arbitrary Python programs and is in fact completely isolated from other Python interpreters that you might happen to have installed.

Installing Python on your machine should solve the problem if this is the case. If you use one of the official Windows installers, at some point it’s going to say something about adding Python to the PATH environment variable; watch for that and make sure that the option is enabled.

If you do have Python installed, then the issue is that Windows can’t find it because it’s not on the PATH. The list of locations currently in the PATH is displayed by Sublime as that big list of folders separated by semicolons. In this case you would need to find the location where the Python binary is installed and add that to the PATH. How you do that is different depending on the version of Windows you’re running, so you will need to Google for specific instructions.

You’ll know that you have set it up properly when you can enter python as a command in the windows command prompt and have the Python interpreter start; this may require closing and reopening the command prompt if it was open at the point where you adjusted the PATH, and you may also have to restart Sublime in order to get it to see the new PATH as well.

Without seeing the text of your build system, this one is harder to diagnose. The more obvious potential problems would be that the file is in some way broken (it must be valid JSON, so watch for things like unquoted strings, using \ in paths, and forgetting to comma separate things) or that Sublime can’t tell which build system it should use.

0 Likes