I use Jedi for Python autocompletion in Emacs, but it's not a dependency of my code so I don't want to put it in my requirements.txt
. (Other developers may not use a Jedi editor plugin, and it's certainly not needed when I deploy to Heroku.)
But Jedi must be available from my virtualenv in order to function, i.e. if I can't
import jedi
it doesn't work.
Is there a good way to install Jedi user-globally such that it is available in all of my virtualenvs?
I think what I want is to
- install Jedi into
~/.local/lib/python2.7/site-packages/
withpip
's--user
flag, then to - create my virtualenv using the equivalent of the
--system-site-packages
flag, but for user packages instead of system packages.
My current workaround is to pip install jedi
in each of my virtualenvs. Then when I add new dependencies I pip install foo
, pip freeze > requirements.txt
, then manually remove jedi
and a few other things from the file before committing. Obviously, this is time-consuming and error-prone.
Does anybody have a better solution?
emacs-jedi
intalled via MELPA. I do not install Jedi globally and fall back to that because I don't want my virtualenvs to see any of the plethora of other global packages that I have installed... If they are self-contained I can be more confident that I have all of my dependencies listed inrequirements.txt
. – Harangue