【发布时间】:2014-04-15 20:12:02
【问题描述】:
我在 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 (not ipython) 解释器出现错误:
ImportError: No module named IPython.core.completerlib
如何才能在 emacs 中正确使用 Ipython 解释器???谢谢。
【问题讨论】: