首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >插件不识别Neovim中的Python主机,尽管Python在

插件不识别Neovim中的Python主机,尽管Python在
EN

Stack Overflow用户
提问于 2016-03-17 10:26:15
回答 1查看 4.2K关注 0票数 2

我在Arch上使用Neovim,为Python支持安装了python3和python3-nevim。直到上一次更新用于新the的python客户端,一切都进行得很好。我特别使用Unite插件,它需要Python支持。

在新版本的python客户端安装好之后,Python支持似乎已经中断。

代码语言:javascript
复制
echo g:loaded_python_provider

返回1和Unite引发以下异常:

代码语言:javascript
复制
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中运行良好。

代码语言:javascript
复制
:python print "Hello"

代码语言:javascript
复制
:python3 print("Hello")

我还尝试使用python_host_prog手动设置python主机。然而,这并没有改变任何事情。

更新:

同时,错误消息略有更改,并包含python异常。此外,当我将python3.4升级到3.5时,我发现我的机器上有一个更新软件包的问题。一些包裹连在一起。它们在两个版本之间被错误地联系在一起。新病毒和python绑定的完全重新安装也没有解决这个问题。

代码语言:javascript
复制
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'
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-05-14 11:36:49

这个问题可以通过调用:UpdateRemotePlugins来解决。此命令对于创建特殊的清单文件是必要的,因为新病毒处理api通信(Msgpack)的方式决定了特殊插件和新病毒之间的通信所需的清单文件。

从python3.4到python3.5的更新使得旧的清单文件过时。因此,它们也必须加以更新。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36057747

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档