I use Neovim on Arch Linux with python-neovim and python3-neovim installed for Python support. Until last update of the python-clients for neovim everything worked well. I particular use the Unite Plugin which needs Python support.
After the new version of python clients for neovim were installed Python support seemed to have broken.
echo g:loaded_python_provider
returns 1 and Unite throws the following exception:
function <SNR>51_call_unite..unite#start..unite#start#standard..unite#init#_current_unite..remote#define#CommandBootstrap..remote#host#Require..<SNR>56_RequirePythonHost, line 15
Vim(if):Channel was closed by the client
Error detected while processing function <SNR>51_call_unite..unite#start..unite#start#standard..unite#init#_current_unite..remote#define#CommandBootstrap..remote#host#Require..<SNR>56_RequirePythonHost:
line 22:
E605: Exception not caught: Failed to load python3 host. You can try to see what happened by starting Neovim with the environment variable $NVIM_PYTHON_LOG_FILE set to a file and opening the generated log file. Also, the host stderr will b
e available in Neovim log, so it may contain useful information. See also ~/.nvimlog.
However, I figured out that python works well within neovim by trying
:python print "Hello"
and
:python3 print("Hello")
I also tried to manually set the python host by using python_host_prog. However this didn't change anything.
UPDATE:
In the meantime the error message has slightly changed and contains the python exception. Furthermore, I found out that there was an issue on my machine with the update of packages when I upgraded python3.4 to 3.5. Some packages linked. They were incorrectly linked between the two versions. Nonethelles, a complete reinstall of neovim and the python api-bindings did also not solve the problem.
function <SNR>51_call_unite[33]..unite#start[1]..unite#start#standard[39]..unite#init#_current_unite[97]..remote#define#CommandBootstrap":
Zeile 5:
no request handler registered for "/home/cutuchiqueno/.vim/plugged/unite.vim/rplugin/python3/unite.py:command:UniteInitializePython"
Encountered ImportError loading plugin at /home/cutuchiqueno/.vim/plugged/unite.vim/rplugin/python3/unite.py: No module named 'unite'
Traceback (most recent call last):
File "/usr/lib/python3.5/site-packages/neovim/plugin/host.py", line 118, in _load
file, pathname, descr = find_module(name, [directory])
File "/usr/lib/python3.5/site-packages/neovim/compat.py", line 29, in find_module
return original_find_module(fullname, path)
File "/usr/lib/python3.5/imp.py", line 296, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named 'unite'
:python3 print "Hello"Did this work? It's not valid python 3 code. - Håken Lidpip install neovimand have the python3 path set up correctly in your .vimrclet g:python3_host_prog = '/path/to/python3'- Håken Lidlet g:python3_host_prog = '/path/to/python3'andlet g:python_host_prog = '/path/to/python2'to myinit.vimbut there is no change in the behaviour, the error mesage is still the same. - Cutú Chiqueño