I want to use mac-ports
python instead of default Apple. When I exec run-python
I get the default python. I could not find any reference under customize-group
and customize-variable
.
2 Answers
The variable you want is python-shell-interpreter
. You can set it with (setq python-shell-interpreter "/path/to/python")
Also, if you want to set the Python interpreter on-the-fly, you can do C-u M-x run-python, which will prompt for the interpreter to use:
run-python
is an interactive autoloaded compiled Lisp function inpython.el
.(run-python &optional CMD DEDICATED SHOW)
Run an inferior Python process.
Argument
CMD
defaults topython-shell-calculate-command
return value. When called interactively withprefix-arg
, it allows the user to edit such value and choose whether the interpreter should beDEDICATED
for the current buffer. When numeric prefix arg is other than 0 or 4 do notSHOW
.For a given buffer and same values of
DEDICATED
, if a process is already running for it, it will do nothing. This means that if the current buffer is using a global process, the user is still able to switch it to use a dedicated one.Runs the hook
inferior-python-mode-hook
aftercomint-mode-hook
is run. (Type C-h m in the process buffer for a list of commands.)