Python サポート用に python-neovim と python3-neovim がインストールされた Arch Linux で Neovim を使用しています。neovim の python-clients が最後に更新されるまで、すべてがうまく機能していました。私は特に、Python のサポートが必要な Unite プラグインを使用しています。
neovim 用の新しいバージョンの Python クライアントがインストールされた後、Python のサポートは壊れているように見えました。
echo g:loaded_python_provider
戻り1
、Unite は次の例外をスローします。
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.
ただし、試してみると、pythonはneovim内でうまく機能することがわかりました
:python print "Hello"
と
:python3 print("Hello")
また、を使用して python ホストを手動で設定しようとしましたpython_host_prog
。しかし、これは何も変わりませんでした。
アップデート:
それまでの間、エラー メッセージはわずかに変更され、python 例外が含まれています。さらに、python3.4 を 3.5 にアップグレードしたときに、パッケージの更新でマシンに問題があることがわかりました。一部のパッケージがリンクされています。これらは、2 つのバージョン間で誤ってリンクされていました。そうではなく、neovim と python api-bindings を完全に再インストールしても問題は解決しませんでした。
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'