I have made python3 the default version for my system (i have put alias python=python3 in ~/.bashrc file). Now when i run python in terminal i get python 3.4.2, but starting the interpreter for elpy runs still python2. How can i change it to be python3 there too?
You can set the python version by
(setq elpy-rpc-python-command "python3")
I suppose i should put it in my init.el? But doing C-c C-z still trigger the 2.7.9. What am i doing wrong?
Here some info, RPC is already 3 but the interactive not:
Elpy Configuration
Virtualenv........: None
RPC Python........: 3.4.2 (/usr/bin/python3)
Interactive Python: python (/usr/bin/python)
Emacs.............: 24.4.1
Elpy..............: 1.12.0
Jedi..............: Not found (0.9.0 available)
Rope..............: Not found (0.10.3 available)
Importmagic.......: Not found (0.1.7 available)
Autopep8..........: Not found (1.2.4 available)
Yapf..............: Not found (0.11.1 available)
Syntax checker....: Not found (pyflakes)
There are different variables. The elpy-rpc-python-command is for the interpreter that the RPC backend will use (Elpy) and then what shell you want to run which is python-shell-interpreter.
So all together it should look like this in your init.el
;; For elpy
(setq elpy-rpc-python-command "python3")
;; For interactive shell
(setq python-shell-interpreter "python3")
Did that solve the question you had?
Closing since no updates
Most helpful comment
There are different variables. The
elpy-rpc-python-commandis for the interpreter that the RPC backend will use (Elpy) and then what shell you want to run which ispython-shell-interpreter.So all together it should look like this in your
init.el