V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
littlewing
V2EX  ›  编辑器

macos sierra + homebrew + vim + YouCompleteMe 出错

  •  
  •   littlewing · 2016-09-30 21:21:16 +08:00 · 3623 次点击
    这是一个创建于 2974 天前的主题,其中的信息可能已经有所发展或是发生改变。

    如题,使用 brew 安装的 python 和 vim , ycm 是直接编译安装的。
    之前一直很正常,最近手贱 brew update && brew upgrade 了,升级了 python 和 vim 之后就不正常了
    出现如下错误:

    Error detected while processing function youcompleteme#Enable[5]..<snr>66_SetUpP ython:
    line 39:
    E887: Sorry, this command is disabled, the Python's site module could not be loa ded.

    vim 信息:

    VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Sep 26 2016 11:13:40) MacOS X (unix) version Included patches: 1-13 Compiled by Homebrew Huge version without GUI. Features included (+) or not (-): +acl +file_in_path +mouse_sgr +tag_old_static +arabic +find_in_path -mouse_sysmouse -tag_any_white +autocmd +float +mouse_urxvt -tcl -balloon_eval +folding +mouse_xterm +termguicolors -browse -footer +multi_byte +terminfo ++builtin_terms +fork() +multi_lang +termresponse +byte_offset -gettext -mzscheme +textobjects +channel -hangul_input +netbeans_intg +timers +cindent +iconv +num64 +title -clientserver +insert_expand +packages -toolbar +clipboard +job +path_extra +user_commands +cmdline_compl +jumplist +perl +vertsplit +cmdline_hist +keymap +persistent_undo +virtualedit +cmdline_info +lambda +postscript +visual +comments +langmap +printer +visualextra +conceal +libcall +profile +viminfo +cryptv +linebreak +python +vreplace +cscope +lispindent -python3 +wildignore +cursorbind +listcmds +quickfix +wildmenu +cursorshape +localmap +reltime +windows +dialog_con -lua +rightleft +writebackup +diff +menu +ruby -X11 +digraphs +mksession +scrollbind -xfontset -dnd +modify_fname +signs -xim -ebcdic +mouse +smartindent -xpm +emacs_tags -mouseshape +startuptime -xsmp +eval +mouse_dec +statusline -xterm_clipboard +ex_extra -mouse_gpm -sun_workshop -xterm_save +extra_search -mouse_jsbterm +syntax
    +farsi +mouse_netterm +tag_binary
    system vimrc file: "$VIM/vimrc" user vimrc file: "$HOME/.vimrc" 2nd user vimrc file: "~/.vim/vimrc" user exrc file: "$HOME/.exrc" defaults file: "$VIMRUNTIME/defaults.vim" fall-back for $VIM: "/usr/local/share/vim" Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X_UNIX -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
    Linking: clang -L. -fstack-protector -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -L/usr/local/lib -o vim -lncurses -liconv -framework Cocoa -mmacosx-version-min=10.12 -fstack-protector-strong -L/usr/local/lib -L/usr/local/Cellar/perl/5.24.0_1/lib/perl5/5.24.0/darwin-thread-multi-2level/CORE -lperl -lm -lutil -lc -F/usr/local/Cellar/python/2.7.12/Frameworks -framework Python -lruby.2.3.0 -lobjc -L/usr/local/Cellar/ruby/2.3.1/lib

    otools 显示如下信息: otool -L /usr/local/bin/vim | grep -i python /usr/local/opt/python/Frameworks/Python.framework/Versions/2.7/Python (compatibility version 2.7.0, current version 2.7.0)

    2 条回复    2016-10-01 00:09:28 +08:00
    xiaody
        1
    xiaody  
       2016-09-30 22:51:08 +08:00
    我今天也遇到了这个报错, vim + editorconfig 。把 homebrew 的 vim 和 python 都卸了以后 brew install vim --with-custom-python 就好了。
    littlewing
        2
    littlewing  
    OP
       2016-10-01 00:09:28 +08:00
    --with-custom-python 是指使用系统的 python ?

    刚刚试了更新到最新版的 8.0.0019 的 vim 就没问题了,最近 github 上 vim8 release 太频繁了,看来还是很不稳定的,早知道就不急着更新了

    去 pullrequest 去
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2464 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 15:59 · PVG 23:59 · LAX 07:59 · JFK 10:59
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.