0

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
2
  • 1
    The answer at the linked question clearly says: "Vim compiled with both, or with 'dynamic' is only available on Windows versions. Mac/*nix/etc can only use one version of Python." If you need vim with both branches of Python you should compile it from sources. Commented Mar 6, 2021 at 6:54
  • 2
    See :help python-dynamic and :help python-2-and-3. Commented Mar 6, 2021 at 10:48

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.