How to build kivy with sublime text mac OSX

青春壹個敷衍的年華 提交于 2020-01-15 03:55:06

问题


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?


回答1:


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


来源:https://stackoverflow.com/questions/22719801/how-to-build-kivy-with-sublime-text-mac-osx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!