How to install vim with both python2 and python3 support?

464 Views Asked by At

Install Vim via Homebrew with Python AND Python3 Support

The solution above does not work.

I tried

brew install vim -python -python3

But it doesn't support python2. What is the current way to support both python2 and python3 with vim? Thanks. (I used linuxbrew.)

$ vim --version | grep python
+comments          +libcall           -python            +visual
+conceal           +linebreak         +python3           +visualextra
Linking: gcc-5 -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -L/home/linuxbrew/.linuxbrew/opt/libyaml/lib -Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/libyaml/lib -L/home/linuxbrew/.linuxbrew/opt/[email protected]/lib -Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/[email protected]/lib -L/home/linuxbrew/.linuxbrew/opt/readline/lib -Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/readline/lib -Wl,-E -Wl,-rpath,/home/linuxbrew/.linuxbrew/Cellar/perl/5.32.1_1/lib/perl5/5.32.1/x86_64-linux-thread-multi/CORE -L/usr/local/lib -Wl,--as-needed -o vim -lm -lncurses -ldl -Wl,-E -Wl,-rpath,/home/linuxbrew/.linuxbrew/Cellar/perl/5.32.1_1/lib/perl5/5.32.1/x86_64-linux-thread-multi/CORE -fstack-protector-strong -L/usr/local/lib -L/home/linuxbrew/.linuxbrew/Cellar/perl/5.32.1_1/lib/perl5/5.32.1/x86_64-linux-thread-multi/CORE -lperl -lpthread -lnsl -ldl -lm -lcrypt -lutil -lc -L/home/linuxbrew/.linuxbrew/Cellar/[email protected]/3.9.2_1/lib/python3.9/config-3.9-x86_64-linux-gnu -lpython3.9 -lcrypt -lpthread -ldl -lutil -lm -lm -Wl,-rpath,/home/linuxbrew/.linuxbrew/Cellar/ruby/3.0.0_1/lib -L/home/linuxbrew/.linuxbrew/Cellar/ruby/3.0.0_1/lib -lruby -lm
0

There are 0 best solutions below