I just followed these instructions to compile vim with python 3: https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source
After the install I checked to see if I have python3:
vim --version | grep "python"
Which returned:
+python3/dyn
and
+python/dyn
But when I start vim and type one of the followinf commands, I get a 0
:
:echo has('python3/dyn')
:echo has('python3')
:echo has('python')
:echo has('python/dyn')
Has anyone had a similar problem?
EDIT: Hey guys lots of helpful comments, I just wanted to say thanks and let you guys know what I did to solve this. I followed the instruction again from the first link I provided but this time I removed vim.tiny and instead of trying to get vim to support both python2 and python3, I just build with python3 support. This fixed it
Typing
python3 print("works")
in vim, shows works
. Typing
echo has('python3')
gives me an output of 1
and finally
vim --version | grep python3
Gives me a value of +python3
Thanks guys for all the help and suggestions!!
:python print "works"
; that's the best test (at least interactively; in a script I would preferhas('python')
,which should work.Sorry, the command is not available in this version
getting this error on vim 8.2 in Mac, what to do?