YouCompleteMe安装报错,No module named ‘ycm_core‘

配置vim作为golang编译器时,提示YouCompleteMe unavailable: requires Vim compiled with Python (2.6+ or 3.3+)”的错误提示,于是下载了vim源码进行了手工编译:

git clone https://github.com/vim/vim.git

cd vim

./configure --enable-pythoninterp=yes --enable-python3interp=yes

make

cp src/vim /usr/local/bin/vim
cd /usr/local/bin/
ln -s vim vi

vim进去后,提示

The ycmd server SHUT DOWN (restart with ':YcmRestartServer'). YCM core library not detected; you need to compile YCM before using it. Follow the instructions in the documentation.

在vim命令行重启后,提示报错,查看日志提示

Traceback (most recent call last):
  File "/Users/tauren/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/utils.py", line 505, in ImportAndCheckCore
    ycm_core = ImportCore()
  File "/Users/tauren/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/utils.py", line 493, in ImportCore
    import ycm_core as ycm_core
ModuleNotFoundError: No module named 'ycm_core'

进入YouCompleteMe目录

cd ~/.vim/bundle/YouCompleteMe

./install.py --clang-completer --go-completer


ERROR: Unable to find cmake executable in any of ['cmake3', 'cmake']. CMake is required to build ycmd

The installation failed; please see above for the actual error. In order to get more information, please re-run the command, adding the --verbose flag. If you think this is a bug and you raise an issue, you MUST include the *full verbose* output.

For example, run:/usr/local/bin/python3 /Users/tauren/.vim/bundle/YouCompleteMe/third_party/ycmd/build.py --clang-completer --verbose

于是手工安装cmake

brew install cmake

安装成功后,vim重新打开,不再提示报错

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值