3

I am trying to install Jedi for emacs26 using MELPA package by following instructions here --http://tkf.github.io/emacs-jedi/released/.I used pip3 to install 'jedi flake8 autopep8' and I also use M-x package-listto intstall jedi.But When I use M-x jedi:install-server ,It only shows: Running: pip install --upgrade /home/lzzz/.emacs.d/elpa/jedi-core-20181207.1/... Runing

After a long time, it didn't reply anything.I don't know what should I do.Is my configure's or network's wrong? I need help.

the jedi error

`Error (jedi):

Failed to start Jedi EPC server.

* EPC Error * Server may raise an error. Use "M-x epc:pop-to-last-server-process-buffer RET" to see full traceback: Traceback (most recent call last): File "/home/lzzz/.emacs.d/elpa/jedi-core-20181207.1/jediepcserver.py", line 39, in import jedi ImportError: No module named jedi

* EPC Server Output (last 10 lines) * Traceback (most recent call last): File "/home/lzzz/.emacs.d/elpa/jedi-core-20181207.1/jediepcserver.py", line 39, in import jedi ImportError: No module named jedi

* EPC Server Config * Server arguments: ("python" "/home/lzzz/.emacs.d/elpa/jedi-core-20181207.1/jediepcserver.py") Actual command: /usr/bin/python VIRTUAL_ENV envvar: nil

* jedi-mode is disabled in # * Fix the problem and re-enable it.

* You may need to run "M-x jedi:install-server". * This could solve the problem especially if you haven't run the command yet since Jedi.el installation or update and if the server complains about Python module imports. `

ruohola
  • 16,015
  • 6
  • 33
  • 67
Lzzz
  • 31
  • 1
  • Is the environment you ran `pip3` the same that emacs is calling with `M-x jedi:install-server`? – al0 May 02 '19 at 02:30

1 Answers1

0

I think the problem may be that Jedi is not starting the server with the same Python environment as the one in which you installed the dependencies.

I would suggest that you first find out which Python executable corresponds to the pip3 you used to install dependencies. Let's say it is /usr/local/bin/python3. Then add the following to your .emacs:

(setq 'jedi:server-command 
      '("/usr/local/bin/python3" "/home/lzzz/.emacs.d/elpa/jedi-core-20181207.1/jediepcserver.py"))

Then, try to run M-x jedi:ac-setup in a python buffer (you shouldn't need the M-x installe-server since you went for the manual installation).

Hope this helps!

kwentine
  • 193
  • 8