I'm starting on a Python 3 project, so I'd like to configure Emacs' run-python command to use the python3 interpreter by default.
I don't want to
python so that it points to python3 instead of python2.7 (because that might cause various bad things)"python3" as an argument to the run-python command each time I run it (because that sounds annoying)I've tried setting python-which-shell to "python3" in my .emacs, but this doesn't seem to work.
On Emacs 24.3, add to your .emacs:
(setq python-shell-interpreter "python3")
If this doesn't work on an older Emacs with a different Python mode, try M-x find-function RET run-python RET to inspect the source for an equivalent variable that can be set.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With