2016-03-29 28 views

回答

1

您必須更改Python解釋emacs正在使用命令

(setq python-shell-interpreter "python3") 

您應該將它設置爲任何您想要的命令。它也可以IPython的在這種情況下,你需要

(setq python-shell-interpreter "ipython" 
     python-shell-interpreter-args "-i") 

其中ipython命令調用的Python 3.5版本的IPython中

1

上述解決方案並沒有爲我工作。什麼做的工作是:

(setq PY-殼名 「python3」)

根據蟒蛇 - mode.el PY-選擇殼,它通過以下方法選擇殼

此執行以下操作:

  • 尋找一個解釋器`PY-選擇殼逐家當 '
  • 使用`PY檢查進口 - 選擇殼通過導入'
  • 查看Path/To/File是否指示Python版本
  • 如果不成功,則返回默認值「py-shell-name」