I use brew to install Python3 on my Mac, and use (setq elpy-rpc-python-command "python3") to set the RPC Python to Python3. This works will when I use the emacs installed through brew. But When I switch to the emacs I download from http://emacsformacosx.com, it get an error like this:
eldoc error: (error Can't find Python command, configure `elpy-rpc-python-command')
elpy-config like this:
Virtualenv........: None
RPC Python........: python3 (not found)
Interactive Python: python (/usr/bin/python)
Emacs.............: 24.5.1
Elpy..............: Not found (Python), 1.11.0 (Emacs Lisp)
Jedi..............: Not found
Rope..............: Not found
Importmagic.......: Not found
Autopep8..........: Not found
Yapf..............: Not found
Syntax checker....: Not found (pyflakes)
And when I try to open this same app through command line, it works fine.
Hello, and thanks for the report! It looks like Emacs can not find the python3 executable in your PATH. If you are starting Emacs from the GUI, but it works in a terminal, it's likely that your shell setup sets PATH correctly, but the desktop environment does not.
You can either configure Mac OS X correctly (I do not know how, though), or use the exec-path-from-shell package to work around this problem.
Does this solve the issue for you?
I have tried the exec-path-from-shell, an it perfectly solve my problem. Thank you!
Most helpful comment
Hello, and thanks for the report! It looks like Emacs can not find the
python3executable in yourPATH. If you are starting Emacs from the GUI, but it works in a terminal, it's likely that your shell setup setsPATHcorrectly, but the desktop environment does not.You can either configure Mac OS X correctly (I do not know how, though), or use the exec-path-from-shell package to work around this problem.
Does this solve the issue for you?