Closed Technophobe01 closed 2 years ago
It is not the issue of deoplete.
@Shougo Agreed, I felt it was useful to document so if people encounter the error then it is tracked here. My hope is it makes the installation easier as it is a non-obvious problem. Your work here and on other projects is appreciated. Stay safe and well.
OK. I will add it later.
I have added it.
Warning: I will close the issue without the minimal init.vim and the reproduction instructions.
Problems summary
The homebrew version of macvim is distributed with python included. Thus, when you try to install pynvim from the command line it will likely be installed in the wrong library location. This results in the headline error. The solution is to set the python path in the .vimrc file and use homebrew to link to the python version installed by macvim.
brew install macvim
brew link --overwrite python@3.10 export PATH="/usr/local/opt/python@3.10/bin:$PATH" pip3 install --user --upgrade pynvim vim
Expected
No error
Environment Information
deoplete version (SHA1):
OS: macOS Monteray Version 12.3.1
neovim/Vim
:version
output: VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Sep 24 2021 06:02:32) macOS version - x86_64 Included patches: 1-3455 Compiled by Homebrew Huge version with MacVim GUI. Features included (+) or not (-): +acl +cursorshape +ipv6 -mouse_sysmouse +ruby +title +arabic +dialog_con_gui +job +mouse_urxvt +scrollbind +toolbar +autocmd +diff +jumplist +mouse_xterm +signs +transparency +autochdir +digraphs +keymap +multi_byte +smartindent +user_commands -autoservername +dnd +lambda +multi_lang -sodium +vartabs +balloon_eval -ebcdic +langmap -mzscheme -sound +vertsplit +balloon_eval_term +emacs_tags +libcall +netbeans_intg +spell +virtualedit +browse +eval +linebreak +num64 +startuptime +visual ++builtin_terms +ex_extra +lispindent +odbeditor +statusline +visualextra +byte_offset +extra_search +listcmds +packages -sun_workshop +viminfo +channel -farsi +localmap +path_extra +syntax +vreplace +cindent +file_in_path +lua +perl +tag_binary +wildignore +clientserver +find_in_path +menu +persistent_undo -tag_old_static +wildmenu +clipboard +float +mksession +popupwin -tag_any_white +windows +cmdline_compl +folding +modify_fname +postscript +tcl +writebackup +cmdline_hist -footer +mouse +printer +termguicolors -X11 +cmdline_info +fork() +mouseshape +profile +terminal -xfontset +comments +fullscreen +mouse_dec -python +terminfo +xim +conceal +gettext -mouse_gpm +python3 +termresponse -xpm +cryptv -hangul_input -mouse_jsbterm +quickfix +textobjects -xsmp +cscope +iconv +mouse_netterm +reltime +textprop -xterm_clipboard +cursorbind +insert_expand +mouse_sgr +rightleft +timers -xterm_save system vimrc file: "$VIM/vimrc" user vimrc file: "$HOME/.vimrc" 2nd user vimrc file: "~/.vim/vimrc" user exrc file: "$HOME/.exrc" system gvimrc file: "$VIM/gvimrc" user gvimrc file: "$HOME/.gvimrc" 2nd user gvimrc file: "~/.vim/gvimrc" defaults file: "$VIMRUNTIME/defaults.vim" system menu file: "$VIMRUNTIME/menu.vim" fall-back for $VIM: "/Applications/MacVim.app/Contents/Resources/vim" Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe -DMACOS_X -DMACOS_X_D ARWIN -g -O2 -arch x86_64 -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 Linking: clang -L. -fstack-protector-strong -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/readline/lib -L. -fstack-protector-strong -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt /openssl@1.1/lib -L/usr/local/opt/readline/lib -arch x86_64 -L/usr/local/lib -o Vim -lm -lncurses -liconv /usr/local/lib/l ibintl.a -framework AppKit -L/usr/local/opt/lua/lib -llua5.4 -fstack-protector-strong -L/System/Library/Perl/5.30/darwin-t hread-multi-2level/CORE -lperl -L/usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/lib/python3.10/confi g-3.10-darwin -lpython3.10 -framework CoreFoundation -F/System/Library/Frameworks -framework Tcl -framework CoreFoundation -lruby.3.1 -L/usr/local/Cellar/ruby/3.1.2/lib:checkhealth
or:CheckHealth
result(neovim only):Provide a minimal init.vim/vimrc with less than 50 lines (Required!)
How to reproduce the problem from neovim/Vim startup (Required!)
brew install python@3.9 brew install macvim brew install python@3.10 which python3 /usr/local/opt/python@3.9/bin/python3 ----- If we now try to install pynvim it will install in the 3.9 path... (bad) pip3 install --user --upgrade pynvim
vim Error: E605: Exception not caught: [vim-hug-neovim-rpc] requires one of
:pythonx import [pynvim|neovim]
command to work :pythonx import sys; print(sys.path)