I want to be able to build kivy programs from sublimetext2 by pressing cmd+B

I have added a kivy build as

{
    "cmd": ["kivy", "-u", "$file"],
    "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)"

}

but each time the error is

Errno 2] No such file or directory
[cmd:  [u'kivy', u'-u', u'/Python_code/Test.py']]
[dir:  /Python_code]
[path: /usr/bin:/bin:/usr/sbin:/sbin]
[Finished]

What is that i am missing in making build setting?

有帮助吗?

解决方案

Unless your kivy executable is in one of the directories listed in the path shown in the error, it won't be executed. To fix this, go to the command line and type which kivy. It should return the full path to the kivy executable. Next, edit your .sublime-build file to include the full path.

For example, if which kivy returns /usr/local/bin/kivy, then your .sublime-build file should look like this:

{
    "cmd": ["/usr/local/bin/kivy", "-u", "$file"],
    "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)"
}
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top