简体   繁体   English

如何为emacs配置python.el以使用python3 shell?

[英]how to configure python.el for emacs to use python3 shell?

I am new to emacs. 我是emacs的新手。 I installed emacs24 which has a built-in python mode(python.el). 我安装了具有内置python模式(python.el)的emacs24。 I cannot find this file and don't know how to configure it to use python3 shell (it's using python2.7 as default). 我找不到此文件,也不知道如何配置它以使用python3 shell(默认情况下使用python2.7)。 Thannks 坦克斯

M-x customize-variable RET python-shell-interpreter RET

Set it to python3. 将其设置为python3。 Afterwards Mx run-python RET should open a Python3 shell. 之后,Mx run-python RET应该打开一个Python3 shell。

If not working yet, check $PATH, make sure the directory holding python3 executable appears. 如果仍然无法运行,请检查$ PATH,确保显示了包含python3可执行文件的目录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM