IPython shell无法启动。

3

我已经在我的路径中安装了ipython.el和python-mode.el,并且我已经将以下内容添加到我的init.el中:

(autoload 'python-mode "python-mode" "Python editing mode." t)
(setq auto-mode-alist (cons '("\\.py$" . python-mode) auto-mode-alist))
(setq interpreter-mode-alist (cons '("python" . python-mode) interpreter-mode-alist))
(setq ipython-command "/Library/Frameworks/EPD64.framework/Versions/Current/bin/ipython")
(require 'ipython)

但是python-mode坚持启动Python解释器而不是IPython。改变py-python-command也没有帮助。我该如何使IPython成为默认选项?
1个回答

1

:)

当我想在emacs中使用ipython时,有同样的问题。

实际上,新的python-mode提供了另一种调用ipython的方法。你只需要调用那个方法就可以解决这个问题。(将函数绑定到你需要的键上)你可以使用以下命令:

M-x ipython

使用IPython

通过调用以下命令在IPython中执行代码:

M-x py-execute-buffer-ipython

但是,说实话,在emacs中使用ipython更慢,使用

py-execute-buffer 

在Python模式下,几乎可以处理所有问题(易于更改代码、移动光标或任何要求)。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接