我最近安装了Python 3.1,但Emacs仍然使用2.6.5。我正在使用Emacs 22.2.1版。我不确定为了使Emacs默认使用Python 3.1而编辑哪些文件!Emacs中Python的更新版本22.2.1
我使用python-mode.el和pyemacs,如果这能帮助...
最佳, 乔治娜
我最近安装了Python 3.1,但Emacs仍然使用2.6.5。我正在使用Emacs 22.2.1版。我不确定为了使Emacs默认使用Python 3.1而编辑哪些文件!Emacs中Python的更新版本22.2.1
我使用python-mode.el和pyemacs,如果这能帮助...
最佳, 乔治娜
见本
先前讨论在你的.emacs文件中,下面应该这样做:
;; python 3
(setq python-python-command "python3")
我所要做的就是添加
(setq py-python-command "/usr/bin/python3.1")
要我.emacs文件。
如果您想“全局”更改Python模式中使用的Python版本,实际上有许多不同的变量需要更改。尝试以下操作:
(add-hook 'python-mode-hook
(lambda()
(setq py-python-command "/usr/bin/python3.1")
(setq py-default-interpreter "/usr/bin/python3.1")))
但我不想使用两个版本 - 只是版本3.1。尽管感谢您的链接! – Georgina 2010-11-29 00:48:57