Sublime Forum

When I click ctrl-b it returns "No Build System" as response

#1

I just installed Python 3.9.9 and Sublime on my Windows laptop. I set up and configured the program as specified in “Python Crash Course, 2nd Ed.” Yet when I try to run my hello_world.py file it gives me an error message that reads as “No Build System.” How can I fix this? I would greatly appreciate any help.

0 Likes

#2

Conditions that can cause this message to appear are:

  1. In Tools > Build System, there is nothing selected (no build, not Automatic, just nothing). If that’s the case, select an appropriate build from the menu or set it to Automatic to let Sublime try to decide.

  2. In Tools > Build System, the setting is Automatic but based on the current type of file there is no suitable build system. If that’s the case you would need to install a package or set up a build for the appropriate case. Or, if you created your own build, it might not have the metadata required to allow Sublime to select it, in which case pick your custom build from the menu.

  3. In Tools > Build System the setting is a specific build you set up. If that’s the case, then the sublime-build file isn’t valid JSON and Sublime can’t parse it. Items appear in the menu based on their file name but are not loaded until you try to actually build with them.

0 Likes

#3

Thank you. I have it set for Tools > Build System > Python3. What do I need to do?

0 Likes

#4

In that case your problem sounds like #3 ; open the build and then paste the contents of it into a checker like jsonlint.com to see if it has any errors that are stopping it from being valid JSON.

0 Likes

#5

When I type: print(“Hello world!”)

I get this message:
Error: Parse error on line 1:
print(“Hello world!”
^
Expecting ‘STRING’, ‘NUMBER’, ‘NULL’, ‘TRUE’, ‘FALSE’, ‘{’, ‘[’, got ‘undefined’

The book I’m working with has not yet mentioned the need to define variables as strings or numbers etc. I thought the quotation marks allowed the compiler to understand that it was supposed to print a series of string variables or a list of string variables. What am I missing?

0 Likes

#6

That looks like you pasted your Python code into the JSON lint tool. You want to open the Python3.sublime-build file (the extension is always sublime-build because it’s a build system, and Python3 comes from the name of the build system in the menu.

You can use View Package File from the command palette to find and open that file, which should be in your User package most likely.

0 Likes

#7

No build system.
{
“cmd”: [“HTML”, “$file”],
“selector”: “source.HTML”,
}(yy.sublime-build)
i have just two files one is yy.sublime-build and index.html
how can i show output in google chrome. is there any other way of running code

0 Likes

#8

probably easier for you to use something like https://packagecontrol.io/packages/View%20In%20Browser than some fictional HTML command line tool and a build system selector which won’t match

0 Likes

#9

Is there any other option to run code except writing commands. Why it is so difficult to run in sublime text 3

0 Likes

#10

What this link do which you send me kingkeith.

0 Likes