Starting SublimeREPL for Scheme gives OSError(2, &

2019-09-04 11:23发布

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条回答
Luminary・发光体
2楼-- · 2019-09-04 11:27

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!

查看更多
登录 后发表回答