0

I am using emacs 25.2.2 on ubuntu 18.04. I would like to use python3 in emacs; however it comes with python 2.7 and I can't find how to reconfigure. The answer 1 which says to use M-x customize-variable RET python-shell-interpreter RET doesn't work for me,python-shell-interpreter isn't found.

Any thoughts? Thanks - Len

LenB
  • 1,126
  • 2
  • 14
  • 31

1 Answers1

0

Could you check if you've installed and enabled Elpy? As suggested on their README, you can achieve this by including the following somewhere in your emacs configuration

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

This should allow you to set the python-shell-interpreter variable. Hope this helps!

Desmond Cheong
  • 798
  • 6
  • 19
  • Thanks for the pointer to elpy. Will try it. Can you explain use-package above? My emacs doesn't have it. – LenB May 26 '20 at 15:22
  • Ah I forgot that it was an installed package. [use-package](https://github.com/jwiegley/use-package) is a package available on Melpa that helps organise your .emacs or .emacs.d/init.el configuration. You can follow the install instructions [here](https://jwiegley.github.io/use-package/installation/). You can also install Elpy straight form Melpa, but you would still need to include ```(elpy-enable)``` somewhere in your emacs configuration. – Desmond Cheong May 27 '20 at 05:58