title: How do I install vim on OSX with Python 3 support?
body: <p>I have trouble installing <code>vim</code> with <code>python 3</code> for <code>MacOS</code>. I'm aware that there is a similar <a href="https://superuser.com/questions/1115159/how-do-i-install-vim-on-osx-with-python-3-support">similar question</a> on that topic. but I couldn't solve the problem</p>
  
  <p>first I ran <code>vim --version</code> and got </p>
  
  <pre><code>Included patches: 1-503, 505-680, 682-1283
  Compiled by root@apple.com
  Normal version without GUI.  Features included (+) or not (-):
  +acl             +file_in_path    -mouse_sgr       +tag_old_static
  -arabic          +find_in_path    -mouse_sysmouse  -tag_any_white
  +autocmd         +float           -mouse_urxvt     -tcl
  -balloon_eval    +folding         +mouse_xterm     -termguicolors
  -browse          -footer          +multi_byte      -terminal
  +builtin_terms   +fork()          +multi_lang      +terminfo
  +byte_offset     -gettext         -mzscheme        +termresponse
  +channel         -hangul_input    +netbeans_intg   +textobjects
  +cindent         +iconv           +num64           +timers
  -clientserver    +insert_expand   +packages        +title
  -clipboard       +job             +path_extra      -toolbar
  +cmdline_compl   +jumplist        -perl            +user_commands
  +cmdline_hist    -keymap          +persistent_undo +vertsplit
  +cmdline_info    +lambda          +postscript      +virtualedit
  +comments        -langmap         +printer         +visual
  -conceal         +libcall         -profile         +visualextra
  +cryptv          +linebreak       +python/dyn      +viminfo
  +cscope          +lispindent      -python3         +vreplace
  +cursorbind      +listcmds        +quickfix        +wildignore
  +cursorshape     +localmap        +reltime         +wildmenu
  +dialog_con      -lua             -rightleft       +windows
  +diff            +menu            +ruby/dyn        +writebackup
  +digraphs        +mksession       +scrollbind      -X11
  -dnd             +modify_fname    +signs           -xfontset
  -ebcdic          +mouse           +smartindent     -xim
  -emacs_tags      -mouseshape      +startuptime     -xpm
  +eval            -mouse_dec       +statusline      -xsmp
  +ex_extra        -mouse_gpm       -sun_workshop    -xterm_clipboard
  +extra_search    -mouse_jsbterm   +syntax          -xterm_save
  -farsi           -mouse_netterm   +tag_binary      
     system vimrc file: "$VIM/vimrc"
       user vimrc file: "$HOME/.vimrc"
   2nd user vimrc file: "~/.vim/vimrc"
        user exrc file: "$HOME/.exrc"
         defaults file: "$VIMRUNTIME/defaults.vim"
    fall-back for $VIM: "/usr/share/vim"
  Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H   -DMACOS_X_UNIX  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1      
  Linking: gcc   -L/usr/local/lib -o vim        -lm -lncurses  -liconv -framework Cocoa 
  </code></pre>
  
  <p>which is the default <code>vim</code> version installed on my mac. Unfortunately, it says: <code>-python3</code>. So I assume python 3 is not installed. So what I did is the following: </p>
  
  <p><code>brew remove vim</code> 
  which went ok and then 
  <code>brew info vim</code>
  and got the following message:</p>
  
  <pre><code>vim: stable 8.1.1550 (bottled), HEAD
  Vi 'workalike' with many additional features
  https://www.vim.org/
  Conflicts with:
    ex-vi (because vim and ex-vi both install bin/ex and bin/view)
    macvim (because vim and macvim both install vi* binaries)
  Not installed
  From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/vim.rb
  ==&gt; Dependencies
  Required: gettext ✔, lua ✔, perl ✔, python ✔, ruby ✔
  ==&gt; Options
  --HEAD
      Install HEAD version
  ==&gt; Analytics
  install: 89,945 (30 days), 222,053 (90 days), 835,730 (365 days)
  install_on_request: 82,933 (30 days), 204,131 (90 days), 747,520 (365 days)
  build_error: 0 (30 days)
  </code></pre>
  
  <p>Is it because there are 2 versions of <code>vim</code> installed now?</p>
  
  <p>I also tried <code>brew install vim --with-python3</code> but got the following message
  <code>invalid option: --with-python3</code>
  when typing <code>vim --version</code>, I get: </p>
  
  <pre><code>vim --version
  VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Feb 22 2019 19:03:04)
  Included patches: 1-503, 505-680, 682-1283
  Compiled by root@apple.com
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>Here are commands with their corresponding outputs</p>
  
  <ul>
  <li><code>sudo nano /etc/paths</code>: </li>
  </ul>
  
  <pre><code>/usr/local/bin
  /usr/bin
  /bin
  /usr/sbin
  /sbin
  </code></pre>
  
  <ul>
  <li><code>command -v vim</code>: </li>
  </ul>
  
  <pre><code>/usr/bin/vim
  </code></pre>
  
  <ul>
  <li><code>$PATH</code>:</li>
  </ul>
  
  <pre><code>-bash: /Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin: No such file or directory
  </code></pre>
  
  <p>Moreover I posted a similar question on <a href="https://apple.stackexchange.com/questions/362833/make-homebrew-installed-vim-override-system-installed-one/362840?noredirect=1#comment481906_362840">another platform</a> and did many attempt to try solving the problem. However the problem still persists.</p>