简体   繁体   English

无法配置 emacs 使用 python3

[英]Unable to configure emacs to use python3

I am using emacs 25.2.2 on ubuntu 18.04.我在 ubuntu 18.04 上使用 emacs 25.2.2。 I would like to use python3 in emacs;我想在 emacs 中使用 python3; however it comes with python 2.7 and I can't find how to reconfigure.但是它带有 python 2.7,我找不到如何重新配置。 The answer 1 which says to use Mx customize-variable RET python-shell-interpreter RET doesn't work for me, python-shell-interpreter isn't found.说使用 Mx customize-variable RET python-shell-interpreter RET 的答案1 Mx customize-variable RET python-shell-interpreter RET doesn't work for me, python-shell-interpreter。

Any thoughts?有什么想法吗? Thanks - Len谢谢 - 莱恩

Could you check if you've installed and enabled Elpy ?你能检查一下你是否安装并启用了 Elpy吗? As suggested on their README, you can achieve this by including the following somewhere in your emacs configuration正如他们自述文件中所建议的那样,您可以通过在 emacs 配置中的某处包含以下内容来实现此目的

(use-package elpy
  :ensure t
  :init
  (elpy-enable))

This should allow you to set the python-shell-interpreter variable.这应该允许您设置 python-shell-interpreter 变量。 Hope this helps!希望这可以帮助!

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

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