title: Installing Vim with python 2 and 3 on CentOS; Python 3 version is too old
body: <p>I'm trying to compile Vim from source with both python2 and python3 support on CentOS because the Black formatter requires python3. I'm following the YouCompleteMe guide for it (<a href="https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source" rel="nofollow noreferrer">https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source</a>). But ./configure fails saying python3 is too old. It seems confused about which binary to run maybe, even though I'm supplying that.</p>
  
  <p>I have python3.6 installed alonside several other versions. I read that Debian can't install Vim with both alongside each other but RHEL wasn't mentioned.</p>
  
  <p>This is my ./configure command:</p>
  
  <pre><code>./configure --with-features=huge \
          --enable-multibyte \
          --enable-rubyinterp=yes \
          --enable-pythoninterp=yes \
          --with-python-command=python2.7 \
          --with-python-config-dir=/usr/lib64/python2.7/config \
          --enable-python3interp=yes \
          --with-python3-config-dir=/usr/lib64/python3.6/config-3.6m-x86_64-linux-gnu \
          --with-python3-command=python3.6 \
          --enable-gui=gtk2 \
          --enable-cscope \
          --prefix=/usr/local \
          --enable-fail-if-missing \
  </code></pre>
  
  <p>./configure fails with this result:</p>
  
  <pre><code>checking Python version... (cached) 2.7
  checking Python is 2.3 or better... yep
  checking Python's install prefix... (cached) /usr
  checking Python's execution prefix... (cached) /usr
  (cached) checking Python's configuration directory... (cached) /usr/lib64/python2.7/config
  (cached) checking Python's dll name... (cached) libpython2.7.so.1.0
  checking if -pthread should be used... yes
  checking if compile and link flags for Python are sane... yes
  checking --enable-python3interp argument... yes
  checking --with-python3-command argument... python36
  checking Python version... (cached) 2.7
  checking Python is 3.0 or better... too old
  configure: error: could not configure python3
  </code></pre>
  
  <p>So... how do I fix this and make it work?</p>