8

I'm on Arch, and recently the vim-python3 and gvim-python3 packages were removed, so I'm working on building vim from source such that the :python command will act as python3. Specifically, I'm doing this so that the vim-jedi package will work properly. I tried changing the

--enable-pythoninterp=dynamic

flag in my PKGBUILD to

--disable-pythoninterp

but when I did vim --version after building and installing, it still showed

+python/dyn

Also, doing

:python import sys;print(sys.version)

showed python 2 still. What do I need to change to have only python 3?

3
  • The exact same command works for me. Jan 19, 2016 at 7:11
  • :python command will act as python3 ... is that possible without mapping :python to :python3?
    – muru
    Jan 19, 2016 at 10:06
  • @muru: I'm not sure. Regardless, in order to get jedi-vim to work, I need python 3 to be the default version in vim, and I'm not sure how to make that happen. Jan 19, 2016 at 15:57

2 Answers 2

7

Thanks to x33a on the Arch forums, I was able to solve my problem. (https://bbs.archlinux.org/viewtopic.php?pid=1596987#p1596987)

I changed the python 3 flag from

--enable-python3interp=dyanmic

to

--enable-python3interp

This resulted in only python 3 being available.

5

The problem was not in Vim's default Python interpreter.

The real root of the problem is that the last version of jedi-vim (0.7.0) was released in 2013 and did not work well with Python 3.

Since then Python 3 support in jedi-vim has been improved a lot. We (Arch users) asked jedi-vim to make a new release. 0.8.0 has been released and now it is in the Arch repo. Please remove the hacked Vim and update Arch. jedi-vim is supposed to work well now.

Moral of this story: do not try to add workarounds over workarounds. Try to find the real root of the issue and fix that. Work with upstream more actively. Do not be afraid to ask.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.