4

Elpy is dependent on a few python packages like jedi, yapf, etc. However when I create enter a new virtual env and enter it using pyvenv-activate elpy is unable to find those packages without me installing them in the virtual environment.

I'd rather not install them in the virtual because it's a pain to do every time and those packages aren't really a requirement for others working on the project, just for me because I'm using elpy.

Is there anyway to point elpy to the global installs for these packages?

  • Very good point. There is an open discussion on Elpy about that (you can +1 it :) ). It is possible for emacs packages to manage the python dependencies differently. – Ehvince May 4 '17 at 14:38
3

You can install jedi/yapf packages in a separate virtualenv and just add $VIRTUAL_ENV/lib/python*/site-packages/ to your PYTHONPATH or to your virtualenv using add2virtualenv. Make sure you are using the same Python version for both virtualenvs.

Alternatively, you can install Elpy and the other packages globally (or user-local) and use the --system-site-packages argument to virtualenv or virtualenvwrapper's toggleglobalsitepackages to give your virtualenv access to those packages.

This is a known issue and you can submit a patch to make it better.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.