I'm using a virtualenvwrapper setup for Python. On my emacs, I have virtualenvwrapper and jedi installed from MELPA.

What I currently do is, I open Emacs, M-x venv-workon RET blabla RET, then M-x jedi:setup RET. Now I have Numpy installed in environment blabla, but not globally. After workon and restarting of the Jedi server, I anticipate Jedi would auto complete Numpy functions from the package automatically. Say when I type import numpy; numpy., after the dot, I want Jedi to jump out and give me a list of completions. But it doesn't. I tried jedi:install-server, it installs it to the old path ~/.emacs.d/.python-environments/default. I guess Jedi is not reading virtualenvwrapper correctly. What's the right way to setup Jedi with virtualenvwrapper?

  • Jedi.el depends on (setq python-environment-directory venv-location). did you set that up correctly? – mutbuerger May 18 '15 at 9:35
  • @mutbuerger it seems to be the problem. But do i have to setup that variable every time i do venv-workon? – Hot.PxL May 18 '15 at 12:37
  • according to this discussion, it has to be set before the jediepcserver is started. – mutbuerger May 18 '15 at 19:50
  • 1
    @mutbuerger it makes sense, but it's not possible. venv-workon isn't that automatic to read VIRTUAL_ENV and switch to the appropriate one before starting Emacs. Anyways I changed to Elpy. it sets everything up for me. Thanks for your help – Hot.PxL May 19 '15 at 3:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.