简体   繁体   中英

How to build kivy with sublime text mac OSX

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]*)"
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM