How do I run a python interpreter in Emacs? How do I run a python interpreter in Emacs? python python

How do I run a python interpreter in Emacs?


Place this in your .emacs to let emacs know where is your python interpretor

 (setq python-shell-interpreter "path\to\your\python3.2")

To learn about.emacs you can read about it in Emacs itself.(Emacs comes with good info manuals and info mode to help to read that manual).

press the following in emacs

M-: (info "(Emacs)Init file") RET.


C-c C-z can do this. It is the key-binding for the command python-switch-to-python


In emacs 25.3.1 I use this to open up a python shell:

M-x run-python

After first adding this to my .emacs file:

(setq python-shell-interpreter "/usr/local/bin/python3")