force_py_version to python2 does not work on Ubuntu 16.10
See original GitHub issueIssue
I’ve added let g:jedi#force_py_version = 2
to my .vimrc.
This yields the error message:
Error detected while processing function jedi#init_python: line 7: Error: jedi-vim failed to initialize Python: Could not setup g:jedi#force_py_ver sion: jedi#setup_py_version: Vim(pyfile):E319: Sorry, the command is not availab le in this version: pyfile /home/kms/.vim/bundle/jedi-vim/initialize.py (in func tion jedi#init_python[3]…<SNR>33_init_python, line 6) Error detected while processing function jedi#init_python[3]…<SNR>33_init_pytho n[4]…jedi#force_py_version[2]…jedi#setup_py_version: line 14: E319: Sorry, the command is not available in this version: pyfile /home/kms/.vim /bundle/jedi-vim/initialize.py
Steps to reproduce
- Install Ubuntu 16.10
- Install jedi-vim
- add
let g:jedi#force_py_version = 2
to your .vimrc - open a python file and see error message
Versions
- jedi-vim: [master] 0.8.0-47-ge66c2e1
- Vim / Neovim: 7.4.1829
- Python: 2.7.12+
In case you are not using jedi-vim from Git master, please test it there, too.
Output of the “JediDebugInfo” command (in a Python buffer)
Output of the “messages” Vim command
Error detected while processing function jedi#init_python: line 7: Error: jedi-vim failed to initialize Python: Could not setup g:jedi#force_py_ver sion: jedi#setup_py_version: Vim(pyfile):E319: Sorry, the command is not availab le in this version: pyfile /home/kms/.vim/bundle/jedi-vim/initialize.py (in func tion jedi#init_python[3]…<SNR>33_init_python, line 6) Error detected while processing function jedi#init_python[3]…<SNR>33_init_pytho n[4]…jedi#force_py_version[2]…jedi#setup_py_version: line 14: E319: Sorry, the command is not available in this version: pyfile /home/kms/.vim /bundle/jedi-vim/initialize.py
Output of “scriptnames” Vim command
1: /usr/share/vim/vimrc 2: /usr/share/vim/vim74/debian.vim 3: /usr/share/vim/vim74/syntax/syntax.vim 4: /usr/share/vim/vim74/syntax/synload.vim 5: /usr/share/vim/vim74/syntax/syncolor.vim 6: /usr/share/vim/vim74/filetype.vim 7: ~/.vimrc 8: /usr/share/vim/vim74/ftoff.vim 9: ~/.vim/bundle/Vundle.vim/autoload/vundle.vim 10: ~/.vim/bundle/Vundle.vim/autoload/vundle/config.vim 11: /usr/share/vim/vim74/ftplugin.vim 12: /usr/share/vim/vim74/indent.vim 13: /usr/share/vim/vim74/indoff.vim 14: /usr/share/vim/vim74/syntax/nosyntax.vim 15: ~/.vim/colors/Dark2_kms.vim 16: ~/.vim/bundle/supertab/plugin/supertab.vim 17: ~/.vim/bundle/csapprox/plugin/CSApprox.vim 18: ~/.vim/bundle/jedi-vim/plugin/jedi.vim 19: /usr/share/vim/vim74/plugin/getscriptPlugin.vim 20: /usr/share/vim/vim74/plugin/gzip.vim 21: /usr/share/vim/vim74/plugin/logiPat.vim 22: /usr/share/vim/vim74/plugin/manpager.vim 23: /usr/share/vim/vim74/plugin/matchparen.vim 24: /usr/share/vim/vim74/plugin/netrwPlugin.vim 25: /usr/share/vim/vim74/plugin/rrhelper.vim 26: /usr/share/vim/vim74/plugin/spellfile.vim 27: /usr/share/vim/vim74/plugin/tarPlugin.vim 28: /usr/share/vim/vim74/plugin/tohtml.vim 29: /usr/share/vim/vim74/plugin/vimballPlugin.vim 30: /usr/share/vim/vim74/plugin/zipPlugin.vim 31: ~/.vim/bundle/csapprox/after/plugin/CSApprox.vim 32: ~/.vim/bundle/jedi-vim/ftplugin/python/jedi.vim 33: ~/.vim/bundle/jedi-vim/autoload/jedi.vim 34: ~/.vim/bundle/SimpylFold/ftplugin/python/SimpylFold.vim 35: /usr/share/vim/vim74/ftplugin/python.vim 36: ~/.vim/bundle/jedi-vim/after/ftplugin/python/jedi.vim 37: /usr/share/vim/vim74/syntax/python.vim 38: ~/.vim/bundle/jedi-vim/after/syntax/python.vim
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (3 by maintainers)
Top GitHub Comments
This was the issue. One must install vim-gnome-py2 rather than the Ubuntu default vim-gnome.
I found a way to use the 17.04 packages with 17.10 from pi-rho: https://askubuntu.com/a/982986/14747.