spacemacs C-c C-p 運行python 之後報錯的解決方法

巨大的建築,總是由一木一石疊起來的,我們何妨做做這一木一石呢?我時常做些零碎事,就是爲此。
這是對的,但是我沒有說過這句話! —— 魯迅

在spacemacs中用 M-x run-python 之後,報錯:

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

如圖:


查看一下 python-shell-completion-native-disabled-interpreters 的幫助

C-h v python-shell-completion-native-disabled-interpreters

如下:

python-shell-completion-native-disabled-interpreters is a variable defined in ‘python.el’.
Its value is ("pypy" "ipython")

Documentation:
List of disabled interpreters.
When a match is found, native completion is disabled.

You can customize this variable.

This variable was introduced, or its default value was changed, in
version 25.1 of Emacs.

[back]

寫的比較清楚,或者將 python 加入到list裏面,或者安裝一個ipython,我選擇了後者:

pip3 install ipython

再重新運行,一切正常了!,直接 C-c C-c 運行.如圖:

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章