Closed oakmegaeddie closed 3 years ago
:help g:python3_host_prog
Here's the solution found in :help g:python3_host_prog
If you plan to use per-project virtualenvs often, you should assign one
virtualenv for Neovim and hard-code the interpreter path via
g:python3_host_prog
so that the "pynvim" package is not required
for each virtualenv.
Example using pyenv:
pyenv install 3.4.4
pyenv virtualenv 3.4.4 py3nvim
pyenv activate py3nvim
python3 -m pip install pynvim
pyenv which python # Note the path
The last command reports the interpreter path, add it to your init.vim:
let g:python3_host_prog = '/path/to/py3nvim/bin/python'
See also: https://github.com/zchee/deoplete-jedi/wiki/Setting-up-Python-for-Neovim
Currently I need to install pynvim every time I create a new virtualenv, is it possible to install it in root environment once and then I can use pynvim in every virtualenv?