How do I install vim on OSX with Python 3 support?

The following works as of 26 May 2017 when a -python3 version of Vim is already installed via homebrew:

brew remove vim
brew cleanup
brew install vim --with-python3

Already get to make it work. vim formula installs vim with python3 support only if python --version is version 3. Doesn't matter if brew install python install python version 3 (because it does in another binary: python3)

From: https://www.reddit.com/r/vim/comments/8iymh8/vim_in_osx_with_python3_support/dyx1b94/

Here are my steps:

  1. alias python=python3
  2. brew install vim
  3. at this point, I get +python3 in the vim --version output
  4. unalias python

I got the same issue today. No matter

brew install vim --with-python3

or

brew install vim --without-python --with-python3

So i check Homebrew's logs at ~/Library/Logs/Homebrew/vim, in 01.configure i found

checking Python is 3.0 or better... too old

This is because configure can not find python3's path

By adding /usr/local/Cellar/python3/3.X.X/bin (your path may be different) to your PATH envoriment and re-run, the vim finally got compiled with +python3