Emacs配置Python开发环境时readline的问题

因系统自带的Python版本较低,因此安装最新稳定版Python3.12.2。安装完成后增加配置如下:

1
(setq python-shell-interpreter "python3.12")

在Emacs内置Python-mode下启动Python解释器时(C-c C-p)提示以下告警信息:

1
■  Warning (python): Your ‘python-shell-interpreter’ doesn’t seem to support readline, yet ‘python-shell-completion-native-enable’ was t and "python3.12" is not part of the ‘python-shell-completion-native-disabled-interpreters’ list.  Native completions have been disabled locally. Consider installing the python package "readline".

按照提示安装readline后再次启动解释器时出现卡死的情况。目前不清楚具体原因,但这个警告可以直接忽略,对使用无影响。