Emacs 用于 IPython
我在Mac上使用Emacs 24.3版本,Python版本是2.7.6,ipython版本是1.2.1。
但是当我想在Emacs中使用ipython时,输入的代码是:
(require 'python)
(setq
python-shell-interpreter "ipython"
python-shell-interpreter-args ""
python-shell-prompt-regexp "In \\[[0-9]+\\]: "
python-shell-prompt-output-regexp "Out\\[[0-9]+\\]: "
python-shell-completion-setup-code
"from IPython.core.completerlib import module_completion"
python-shell-completion-module-string-code
"';'.join(module_completion('''%s'''))\n"
python-shell-completion-string-code
"';'.join(get_ipython().Completer.all_completions('''%s'''))\n")
可是当我按下'C-c C-z'时,它显示:
Run Python: nil
当我只是按下ENTER键时,返回了一个错误:
Searching for program: no such file or directory, nil
我也尝试过:
Run Python: python
Python(不是ipython)解释器出现了错误:
ImportError: No module named IPython.core.completerlib
我该怎么做才能在Emacs中正确使用ipython解释器呢?谢谢。