You mention in the comments, that the file Python.h is located in the directory $LOCAL_INSTALL/include/python3.8. This directory is not in the search path for include files. So it has to be added manually.
The configure script adds the compiler flags from the environment variable ...
What program is called when K is pressed is set by keywordprg.
By default, this is set to man (the linux manual). Changing it to pydoc so as to get Python documentation will do the trick, but then you don't the manual being checked anymore - which is an issue if, for example, you're working with C code, as C's library code has documentation in the man system ...
It seems that when you copied the snippet you forgot to add the indentation spaces in the python snippet conditional code as shown in the error message:
Executed snippet code:
2 if t and t not in [',', '.', '?', '-', ' ']:
3 snip.rv = ' '
5 snip.rv = ''
Try to change it to:
snippet im "create an inline ...
Here are the commands I use to create a python 3.6.0 pyenv on a Mac using homebrew. Please note that I use neovim but the process to create a pyenv will not be much different for vim.
Install readline and xz along with pyenv and pyenv-virtualenv
brew install pyenv pyenv-virtualenv readline xz
Install python 3.6.0
CFLAGS="-I$(brew --prefix openssl)/...
You can compile Vim from source to configure which interpreter it should use. The full instructions can be found on the YouCompleteMe wiki.
It turns out the method described in the original post is correct: configuring the installation with the following options should have Vim link against Python 3.7
Here's a pure vimscript function that builds up the command by searching for functions (def) and classes (class). You may need to adjust the filename modifiers or the command; parameters or global vars could be used for that if one wanted to build a plugin.
function python#runTest() abort
const l:file = expand('%:p')
I have managed to automate this feature using vimscript-python. Add this function to your ~/.vimrc:
python3 << EOF
import vim # https://vimhelp.org/if_pyth.txt.html
cursor = vim.current.window.cursor
test_filename = vim.eval("expand('%p')")
test_name = None
class_name = None
for line_no in range(...
Check :version of your gvim. It should have +python3/dyn there for the python3 support.
Both python3 and gvim should be 64 bit. (Windows binaries from vim.org are 32bit)
Then try adding to your vimrc: