Elpy: Use elpy with Python3

Created on 12 Mar 2016  路  2Comments  路  Source: jorgenschaefer/elpy

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.

Question

Most helpful comment

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?

All 2 comments

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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mdk2029 picture mdk2029  路  5Comments

kirk86 picture kirk86  路  5Comments

Arseny-N picture Arseny-N  路  4Comments

rthompsonj picture rthompsonj  路  6Comments

chechoRP picture chechoRP  路  5Comments