1
我在mac上使用Emacs版本24.3。 python是'2.7.6',ipython是'1.2.1'。用於ipython的Emacs
但是,當我想在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-Z',它顯示:
Run Python: nil
,當我只按ENTER鍵,錯誤返回:
Searching for program: no such file or directory, nil
我也試過:
Run Python: python
蟒(不IPython的)解釋顯示了錯誤:
ImportError: No module named IPython.core.completerlib
我怎樣才能作出正確的使用IPython的interprter在Emacs ???謝謝。
你能詳細說明嗎?我不知道它是如何工作的。 – acui145
我正在使用emacs24.3,正如我從網上學到的,在大多數人使用python.el而不是python-mode.el的版本中,它使得emacs中的ipython更容易,但我不知道爲什麼是我的不起作用。 – acui145
@ acui145:好的,只需從我發佈的鏈接下載tar,然後閱讀'INSTALL'。對於'python.el'也可能有一個簡單的解決方案。如果您沒有其他考慮因素您可以嘗試'python-mode.el'。 – Adobe