我在Mac OS X El Capitan上使用Sublim Text 3.我需要做的是评估Sublime Text 3中的Python文件.
我已经安装了Package Control,然后安装了SublimREPL插件.
我已经设置了2行布局(View> Layout> Rows:2),以便在屏幕的第二部分显示Python解释器.
然后我用Tools>启动Python解释器.命令调色板…> SublimeREPL:Python.
解释器正确启动,我得到了这个:
我找不到如何从我手动下载的Python 3.5开始(因此安装在/usr/local/bin /中).我试图修改这个文件:/ Library / Application Support / Sublime Text 3 / Packages / SublimeREPL / Config / Python / Main.sublime-menu遵循this post指令,但这没有改变任何东西(Python 2.7.10仍然推出).
[
{
"id": "tools","children":
[{
"caption": "SublimeREPL","mnemonic": "R","id": "SublimeREPL","children":
[
{"caption": "Python","id": "Python","children":[
{"command": "repl_open","caption": "Python","id": "repl_python","mnemonic": "P","args": {
"type": "subprocess","encoding": "utf8","cmd": ["python","-i","-u"],"cwd": "$file_path","Syntax": "Packages/Python/Python.tmLanguage","external_id": "python","extend_env": {"PYTHONIOENCODING": "utf-8"}
}
},{"command": "python_virtualenv_repl","id": "python_virtualenv_repl","caption": "Python - virtualenv"},{"command": "repl_open","caption": "Python - PDB current file","id": "repl_python_pdb","mnemonic": "D","-u","-m","pdb","$file_basename"],"caption": "Python - RUN current file","id": "repl_python_run","caption": "Python - IPython","id": "repl_python_ipython","mnemonic": "I","autocomplete_server": true,"cmd": {
"osx": ["python","${packages}/SublimeREPL/config/Python/ipy_repl.py"],"linux": ["python","windows": ["python","${packages}/SublimeREPL/config/Python/ipy_repl.py"]
},"extend_env": {
"PYTHONIOENCODING": "utf-8","SUBLIMEREPL_EDITOR": "$editor"
}
}
}
]}
]
}]
}
]
仍然遵循this post建议,我修改了下面的代码部分,但我在文件夹/usr/local/bin /中找不到任何exe文件:
{"command": "repl_open","args": {
"type": "subprocess","cmd": ["/usr/local/bin/python3","extend_env": {"PYTHONIOENCODING": "utf-8"}
}
}
当我按下Ctrl,f(根据doc)时,解释器仍然以Python 2.7.10开头.