I am trying install vim8.1 as a local user on CENTOS7, following the procedure found https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source [here], but with some changes.
I get into problem with the python
fatal error: Python.h: No such file or directory
#include <Python.h>
After cloning vim I do the following, without error:
./configure --with-features=huge --enable-multibyte --enable-rubyinterp=yes --enable-python3interp=yes --with-python3-config-dir=/usr/local/lib/python3.7/config-3.7m-x86_64-linux-gnu --enable-perlinterp=yes --enable-luainterp=yes --enable-gui=gtk2 --enable-cscope --prefix=/home/myuser
I am setting python3.7 (which is the python version I am using) as "pypython3-config-dir", but it seems to find python3.4:
cc -std=gnu99 -c -I. -I/home/myuser/env/env3/include/python3.4m -pthread -fPIE -Iproto -DHAVE_CONFIG_H -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -o objects/if_python3.o if_python3.c
This is strange to me, but more problematic is that it cannot find the Python.h. This happens also when I add /usr/include/python3.4m
when the file Python.h is located to the PATH:
PATH=/usr/include/python3.4m:$PATH
echo $PATH
shows that it is there.
Can anyone help me with this? I imagine that keeping version 3.4 in the installation of vim is not a problem for me.