我最近安裝了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