Starting SublimeREPL for Scheme gives OSError(2, 'No such file or directory')

一笑奈何 提交于 2019-12-12 03:08:59

问题


I've been trying to use SublimeREPL to run an interactive interpreter of Scheme, but I keep getting the error message "OSError(2, 'No such file or directory')". I know it's likely a file path issue in Main.sublime-menu, but I just can't seem to figure it out. Not sure if I'm missing something obvious or what. Any help would be appreciated! Here is the config file that I have in SublimeREPL/config/Scheme (unchanged since install):

[
 {
    "id": "tools",
    "children":
    [{
        "caption": "SublimeREPL",
        "mnemonic": "r",
        "id": "SublimeREPL",
        "children":
        [
            {"caption": "Scheme",
             "id": "Scheme",

             "children":[
                {"command": "repl_open",
                 "caption": "Scheme",
                 "id": "repl_scheme",
                 "mnemonic": "r",
                 "args": {
                    "type": "subprocess",
                    "encoding": "utf8",
                    "external_id": "scheme",
                    "cmd": {"linux": ["scheme"],
                            "osx": ["scheme"],
                            "windows": ["scheme"]},
                    "soft_quit": "\nexit\n",
                    "cwd": "$folder",
                    "cmd_postfix": "\n",
                    "extend_env": {"INSIDE_EMACS": "1"},
                    "syntax": "Packages/sublime-scheme-syntax/Scheme.tmLanguage"
                    }
                },
                {"command": "repl_open",
                 "caption": "Gauche",
                 "id": "repl_gauche",
                 "mnemonic": "r",
                 "args": {
                    "type": "subprocess",
                    "encoding": "utf8",
                    "external_id": "gauche",
                    "cmd": {"linux": ["gosh", "-i"],
                            "osx": ["gosh", "-i"],
                            "windows": ["gosh", "-i"]},
                    "soft_quit": "\n(exit)\n",
                    "cwd": "$folder",
                    "cmd_postfix": "\n",
                    "extend_env": {"INSIDE_EMACS": "1"},
                    "syntax": "Packages/Gauche/Gauche.tmLanguage"
                    }
                },
                {"command": "repl_open",
                 "caption": "Petite Chez Scheme",
                 "id": "repl_petite",
                 "mnemonic": "r",
                 "args": {
                    "type": "subprocess",
                    "encoding": "utf8",
                    "external_id": "petite",
                    "cmd": {"linux": ["petite"],
                            "osx": ["petite"],
                            "windows": ["petite"]},
                    "soft_quit": "\n(exit)\n",
                    "cwd": "$folder",
                    "cmd_postfix": "\n",
                    "extend_env": {"INSIDE_EMACS": "1"},
                    "syntax": "Packages/sublime-scheme-syntax/Scheme.tmLanguage"
                    }
                }
            ]}
        ]
    }]
}
]

回答1:


You don't appear to have scheme installed on your system. The /Users/Jerridan/Library/Application Support/Sublime Text 2/Packages/Scheme directory is just the Scheme package for Sublime - syntax highlighting, completions, etc. It doesn't contain the actual Scheme interpreter. There appear to be several scheme versions available online, so do some research and install the one that would fit your needs.

Once installed, note the path to the interpreter. If you're still getting the No Such File or Directory error, edit the "cmd" section of the Main.sublime-menu file you posted to add the full path. For example, if you install Petite Chez Scheme and which petite returns /usr/local/bin/petite, then add that to the "osx" section of the "cmd":

"osx": ["/usr/local/bin/petite"],

Good luck!



来源:https://stackoverflow.com/questions/21081863/starting-sublimerepl-for-scheme-gives-oserror2-no-such-file-or-directory

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