简体   繁体   English

适用于ipython的Emacs

[英]Emacs for ipython

I am using Emacs Version 24.3 on mac. 我正在Mac上使用Emacs 24.3版本。 and python is '2.7.6', ipython is '1.2.1'. python是'2.7.6',ipython是'1.2.1'。

But when I want to use ipython in emacs with code: 但是当我想在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")

but when I press 'Cc C-z', it shows: 但是当我按“抄送C-z”时,它显示:

Run Python: nil

when I just press ENTER, error returned: 当我只按Enter键时,返回错误:

Searching for program: no such file or directory, nil

I also have tried: 我也尝试过:

Run Python: python

python ( not ipython ) interpreter shows up with error: python( 不是ipython )解释器出现错误:

ImportError: No module named IPython.core.completerlib

How can I make it right to use Ipython interprter in emacs??? 如何在emacs中正确使用Ipython解释器??? Thank you. 谢谢。

In python-mode there's a menu PyShell -> ipython-dedicated . python模式下,有一个菜单PyShell -> ipython-dedicated I think that's simplest. 我认为那是最简单的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM