python - How Do I Setup SublimeREPL with Anaconda's interpreter? -
i love python in sublimetext, need interactive mode data exploration. however, life of me cannot sublimerepl use anaconda's interpreter. ideas appreciated.
i have added following sublimerepl.settings.user file, doesn't have effect:
{ "default_extend_env": {"path": "users/anton/anaconda/envs/py3k/bin/python3:{path}"} }
in packages/user
folder, create sublimerepl/config/python/main.sublime-menu
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 "cmd"
lines, change /path/to/anaconda/python
actual path python executable want use. if you're on windows, either use single /
path delimiter, or double \\
:
c:/anaconda/bin/python.exe # or c:\\anaconda\\bin\\python.exe
save file, , should have tools -> sublimerepl -> python -> python - anaconda
, ipython - anaconda
menu options start repls anaconda interpreter. if have multiple versions of python installed (for example, 2.7 , 3.3) can duplicate children
contents , alter caption
, cmd
paths appropriately.
Comments
Post a Comment