I have multiple vim plugins (ropevim, taskwarrior etc.) which depend on python libraries. These libraries are installed in system python3
When I am working on a python project, the virtual environment for that project does not have these libraries. Resulting in these plugins not working and dumping a ton of error messages on the console.
Is it possible to ensure that vim always uses the same virtual environment (or system python env) for its plugins irrespective of what the shell virtualenv is?
Note I had asked this Q. on stackoverflow. someone recommended asking in this sub group. I will close the Q. there
let $VARNAME = 'value'
. I'm not really familiar with virtualenv, but you can probably do a bit of muckery with that to ensure it's set up correctly, for example by prefixing$PATH
with the desired virtualenv (and maybe also some others, like some$PYTHON*
ones). Checkenv | grep -i python
to see what it sets.activate
script backs-up the system PATH and PYTHON_HOME to _OLD_VIRTUAL_PATH and _OLD_VIRTUAL_PYTHONHOME. So checking for and restoring them before the call tovundle#begin()
should do the trick.