sublimeREPL解释器更改
来源:互联网 发布:网络传输异常 编辑:程序博客网 时间:2024/05/16 15:23
在sublime 3 下安装sublimeREPL后,解释器为ubuntu原始python2.7.6,即便在terminal中python为anaconda。
不想通过很脏的手段,用anaconda的软链接替代/usr/lib/python2.7下的python,参考这里的方式,在sublimeREPL上增加了anaconda解释器的选项。
In your Packages/User folder, create SublimeREPL/config/Python/Main.sublime-menu with the following contents:
[ { "id": "tools", "children": [{ "caption": "SublimeREPL", "mnemonic": "r", "id": "SublimeREPL", "children": [ { "caption": "Python", "id": "Python", "children":[ { "command": "repl_open", "caption": "Python - Anaconda", "id": "repl_python", "mnemonic": "p", "args": { "type": "subprocess", "encoding": "utf8", "cmd": ["/path/to/Anaconda/python", "-i", "-u"], "cwd": "$file_path", "syntax": "Packages/Python/Python.tmLanguage", "external_id": "python", "extend_env": {"PYTHONIOENCODING": "utf-8"} } }, { "command": "repl_open", "caption": "IPython - Anaconda", "id": "repl_python_ipython", "mnemonic": "p", "args": { "type": "subprocess", "encoding": "utf8", "autocomplete_server": true, "cmd": ["/path/to/Anaconda/python", "-u", "${packages}/SublimeREPL/config/Python/ipy_repl.py"], "cwd": "$file_path", "syntax": "Packages/Python/Python.tmLanguage", "external_id": "python", "extend_env": { "PYTHONIOENCODING": "utf-8", "SUBLIMEREPL_EDITOR": "$editor" } } } ] } ] }] }]
In the
"cmd"
lines, change/path/to/Anaconda/python
with the actual path to your python executable you want to use.
Save the file, and you should now haveTools -> SublimeREPL -> Python -> Python - Anaconda
andIPython - Anaconda
menu options to start REPLs with the Anaconda interpreter. If you have multiple versions of Python installed (for example, 2.7 and 3.3) you can just duplicate the children contents and alter the caption and cmd paths appropriately.
需要注意的是,上述设置中id
最好进行更改,不然会覆盖原来的选项
- sublimeREPL解释器更改
- 更改默认pyyhon解释器
- 打造python+sublime text 3开发环境,解决Ctrl+b 调用SublimeREPL解决input()问题、设置代理服务、更改字体
- 安装和配置SublimeREPL
- SublimeREPL 插件安装
- SublimeREPL 插件安装
- sublimeREPL 快捷键配置
- sublimerepl 快捷键设置
- SublimeREPL中添加运行Processing功能
- Sublime Text 为SublimeREPL绑定快捷键
- Sublime Text 为SublimeREPL绑定快捷键
- Sublime Text3快捷键绑定及SublimeREPL设置
- sublimeREPL安装,如何修改Python路径
- 解释器
- 解释器
- 解释器
- 更改
- 更改
- 认识HSV和RGB颜色空间
- java实现四舍五入并且保留两位小数
- 欢迎使用CSDN-markdown编辑器
- 逆向/smali/加壳/反编译/root权限-android
- Redis集群方案及实现
- sublimeREPL解释器更改
- 利用Bmob公司的云服务实现获取短信验证码登录操作
- CSDN-markdown编辑器文档
- 19. Remove Nth Node From End of List
- redis3.0.0 集群安装详细步骤
- 4. Median of Two Sorted Arrays
- D3.js 学习笔记
- RxJava与RxAndroid学习记录
- 1076 An Easy Task