首页 > 系统服务 > 详细

解决 vim 报错:the imp module is deprecated in favour of importlib

时间:2018-07-24 11:41:56      阅读:6210      评论:0      收藏:0      [点我收藏+]

问题描述:
打开 vim 之后,出现如下错误:

Error detected while processing function youcompleteme#Enable[3]..<SNR>71_SetUpPython:
line   42:
/must>not&exist/foo:1: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module‘s documentation for alternative uses

原因:
这个问题出现在使用 Python 3.7 的情况,
可以暂时在 .vimrc 中做如下配置,并等待更新 Python 3.7 来解决这个问题:

解决办法:
在.vimrc中加入如下

" temporary fix
" https://github.com/vim/vim/issues/3117
if has(‘python3‘)
  silent! python3 1
endif

其他解决方法:
https://github.com/vim/vim/issues/3117

解决 vim 报错:the imp module is deprecated in favour of importlib

原文:https://www.cnblogs.com/theodoric008/p/9359039.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!