1

I am using the default python.el python-mode for my Python development in Emacs. When I run the command python-shell-send-buffer with C-c C-c, it prompts me by default with:

Run Python: /usr/bin/python -i

I would like this to default to /usr/bin/python3 without the -i option. Is there a variable where I can set for the path that shows up for the python-shell-send-buffer command? I have looked through the completions for python-shell- but couldn't find what I am looking for. Thank you!

  • This don't work. When you type C-c C-c, Emacs still use Python2 interpreter. – Lol Feb 26 '17 at 12:16
3

python-shell-interpreter is a variable defined in python.el. Its [default] value is "python".

Documentation: Default Python interpreter for shell.

You can customize this variable.

python-shell-interpreter-args is a variable defined in python.el. Its [default] value is "-i".

Documentation:  Default arguments for the Python interpreter.

You can customize this variable.
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.