tkf / emacs-jedi

Python auto-completion for Emacs
http://tkf.github.io/emacs-jedi/latest/
666 stars 89 forks source link

Jedi:install-server fails with code 127 #305

Open appetrosyan opened 6 years ago

appetrosyan commented 6 years ago

installed Jedi through use-package. pulled in pip, pip3, Jedi python package etc. get the following error

Running: pip install --upgrade /Users/app/Library/Preferences/Aquamacs Emacs/Packages/elpa/jedi-core-20170121.610/...Done
deferred error : (error "Deferred process exited abnormally:
  command: /Users/app/Library/Preferences/Aquamacs Emacs/Packages/.python-environments/default/bin/pip
  exit status: exit 127
  event: exited abnormally with code 127
  buffer contents: \"/Applications/Aquamacs.app/Contents/MacOS/Aquamacs: /Users/app/Library/Preferences/Aquamacs Emacs/Packages/.python-environments/default/bin/pip: No such file or directory
\"")

Problem is, pip is installed and that file clearly exists. My suspicion is that the path contains a space and therefore can't be properly parsed.

marcintustin commented 6 years ago

I'm seeing the exact same error, but the python-environment does not exist; clearly jedi is NOT creating the virtualenv.

I have jedi-core 20170121.610 and not jedi.

Update: installing jedi doesn't help.

marcintustin commented 6 years ago

Update: I have a working workaround with this:

(use-package jedi-core
  :ensure t
  :config
  (setq python-environment-directory "~/.emacs.d/.python-environments"))

Looks like the root cause is a combination of how Aquamacs is configured and presumably the underlying virtualenv library not handling spaces.

immerrr commented 6 years ago

Hi, I have tried this on a fresh 10.11 install and I'm afraid I cannot reproduce it. What I did:

(require 'gnutls)
(push "/usr/local/etc/openssl/cert.pem" gnutls-trustfiles)

(package-install 'use-package)
(require 'use-package)
(use-package jedi
  :ensure t
  :config
  (add-hook 'python-mode-hook 'jedi:setup)
  (setq jedi:complete-on-dot t)
  (global-auto-complete-mode 1))

After that jedi:install-server just worked and I was able to get completions. Could you try again installing the recent version of emacs-jedi?