2024-04-27 09:34:27 发布
网友
Emacs使用的是python的旧版本(2.3),默认的python模式是我拥有的,有没有办法告诉Emacs使用我在主目录中拥有的新版本?
顺便说一句,我使用的是红帽发行版,没有根权限。
python-python-command是为老的“loveshack python.el”设计的。对于使用“gallina python.el”的Emacs的最新版本,请使用变量python-shell-interpreter。
python-python-command
python-shell-interpreter
(setq python-shell-interpreter "/path/to/python")
https://www.emacswiki.org/emacs/PythonProgrammingInEmacs#toc2
尝试添加到您的~/.emacs文件:
~/.emacs
(setq python-python-command "~/your/python/bin-dir/python")
或者
Emacs运行的python命令通常是python,因此您可以尝试更改路径的简单方法:
python
export PATH=~/your/python/bin-dir:$PATH
检查要调整的内容的自定义组是一个好习惯。只要做:
M-x customize-group RET python RET
你现在有多种选择,其中一个应该很有趣:
Python Python Command
您可以在那里自定义它并保存以供以后的会话使用。
python-python-command
是为老的“loveshack python.el”设计的。对于使用“gallina python.el”的Emacs的最新版本,请使用变量python-shell-interpreter
。https://www.emacswiki.org/emacs/PythonProgrammingInEmacs#toc2
通过.emacs:
尝试添加到您的
~/.emacs
文件:或者
通过shell环境:
Emacs运行的python命令通常是
python
,因此您可以尝试更改路径的简单方法:检查要调整的内容的自定义组是一个好习惯。只要做:
你现在有多种选择,其中一个应该很有趣:
您可以在那里自定义它并保存以供以后的会话使用。
相关问题 更多 >
编程相关推荐