Closed hutou closed 4 years ago
You need to rebuild vim with python3
support.
Have you tried pacman -S python-pynvim
instead of sudo pip3 install neovim
?
Yes, I uninstalled with pip3, then reinstalled with pacman without success.
I'll try to rebuild vim, but It seems strange to me to have to do it to get a plugin working.
Thanks anyway
NB. vim --version
show that python3/dyn is included.
@hutou Please read :help has-python
.
*has-python*
You can test what Python version is available with: >
if has('python')
echo 'there is Python 2.x'
endif
if has('python3')
echo 'there is Python 3.x'
endif
Note however, that when Python 2 and 3 are both available and loaded
dynamically, these has() calls will try to load them. If only one can be
loaded at a time, just checking if Python 2 or 3 are available will prevent
the other one from being available.
To avoid loading the dynamic library, only check if Vim was compiled with
python support: >
if has('python_compiled')
echo 'compiled with Python 2.x support'
if has('python_dynamic')
echo 'Python 2.x dynamically loaded'
endif
endif
if has('python3_compiled')
echo 'compiled with Python 3.x support'
if has('python3_dynamic')
echo 'Python 3.x dynamically loaded'
endif
endif
This also tells you whether Python is dynamically loaded, which will fail if
the runtime library cannot be found.
I think Python2 is loaded before Python3 in your environment. So, Python2 is used and pynvim module is not installed in Python2.
You need to set python3 manually.
set pyxversion=3
NB. vim --version show that python3/dyn is included.
It means, you can load Python2 or Python3.
It is not both
.
Problem solved, finally, by disabling the brookhong/DBGPavim
plugin !
After that, I had yet the following error message :
[vim-hug-neovim-rpc] rpc method [nvim_set_client_info] not implemented in pythonx/neovim_rpc_methods.py.
but a PlugUpdate solved it too ! Everything is Ok, now. Thanks
The issue should be closed
@hutou Hi. I have same error. how did you solve it?
~ vim --version | grep +python +comments +libcall +python/dyn +visualextra
vim --version ✔ 09:08:41 VIM - Vi IMproved 8.1 (2018 May 18, compiled Dec 13 2019 14:45:40) Included patches: 1-503, 505-680, 682-1312 Compiled by root@apple.com Normal version without GUI. Features included (+) or not (-): +acl +extra_search -mouse_netterm -tag_old_static -arabic -farsi +mouse_sgr -tag_any_white +autocmd +file_in_path -mouse_sysmouse -tcl +autochdir +find_in_path -mouse_urxvt -termguicolors -autoservername +float +mouse_xterm +terminal -balloon_eval +folding +multi_byte +terminfo -balloon_eval_term -footer +multi_lang +termresponse -browse +fork() -mzscheme +textobjects +builtin_terms -gettext +netbeans_intg +textprop +byte_offset -hangul_input +num64 +timers +channel +iconv +packages +title +cindent +insert_expand +path_extra -toolbar -clientserver +job -perl +user_commands -clipboard +jumplist +persistent_undo -vartabs +cmdline_compl -keymap +postscript +vertsplit +cmdline_hist +lambda +printer +virtualedit +cmdline_info -langmap -profile +visual +comments +libcall +python/dyn +visualextra -conceal +linebreak -python3 +viminfo +cryptv +lispindent +quickfix +vreplace +cscope +listcmds +reltime +wildignore +cursorbind +localmap -rightleft +wildmenu +cursorshape -lua +ruby/dyn +windows +dialog_con +menu +scrollbind +writebackup +diff +mksession +signs -X11 +digraphs +modify_fname +smartindent -xfontset -dnd +mouse +startuptime -xim -ebcdic -mouseshape +statusline -xpm -emacs_tags -mouse_dec -sun_workshop -xsmp +eval -mouse_gpm +syntax -xterm_clipboard +ex_extra -mouse_jsbterm +tag_binary -xterm_save 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/share/vim" Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X_UNIX -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 Linking: gcc -L/usr/local/lib -o vim -lm -lncurses -liconv -framework Cocoa
Please read whole discussion.
You need to install Python3 enabled Vim.
@Shougo --> Please read whole discussion. Sorry, I am a newbie, although I have read a couple of times, I couldn't get a sense of what needs to be done.
obersvations: import pynvim fails in Python 2.7 shell where as It is already installed in 3.7
Looks like I need to : set pyxversion=3
But I do not know how to enable that.
--> You need to install Python3 enabled Vim. Can you please guide me how to achieve this. Thanks a lot in advance.
You should build Vim or install Vim by homebrew.
Apple build Vim seems not enabled Python3 support.
Sure I'll try that and post my observations. Thanks.
Since a few days, I get the following error message when launching Vim on my (uptodate) Archlinux x86_64 :
I think the problem occured after an update, either to my System (there has been a lot of python packages updated recently) or to my Vim Plugins after a PlugUpdate.
To solve the this problem, I tried different solutions found on the Web, but no luck. Finally, I uninstalled several packages pip, neovim, greenlet, ... and reinstalled neovim.
but without success, error remains the same !
Vim says :
Please, can you help ?
My Vim version is :