New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YouCompleteMe unavailable: requires Vim compiled with Python (2.6+ or 3.3+) support #2573

Closed
zwhitchcox opened this Issue Mar 14, 2017 · 15 comments

Comments

Projects
None yet
@zwhitchcox

zwhitchcox commented Mar 14, 2017

Issue Prelude

Please complete these steps and check these boxes (by putting an x inside
the brackets) before filing your issue:

  • [x ] I have read and understood YCM's [CONTRIBUTING][cont] document.
  • [ x] I have read and understood YCM's [CODE_OF_CONDUCT][code] document.
  • [x ] I have read and understood YCM's [README][readme], especially the
    [Frequently Asked Questions][faq] section.
  • [ x] I have searched YCM's issue tracker to find issues similar to the one I'm
    about to report and couldn't find an answer to my problem. ([Example Google
    search.][search])
  • [ x] If filing a bug report, I have included the output of vim --version.
  • If filing a bug report, I have included the output of :YcmDebugInfo. didn't work
  • If filing a bug report, I have attached the contents of the logfiles using
    the :YcmToggleLogs command. didn't work
  • [ x] If filing a bug report, I have included which OS (including specific OS
    version) I am using.
  • If filing a bug report, I have included a minimal test case that reproduces
    my issue, including what I expected to happen and what actually happened. ??
  • [ x] I understand this is an open-source project staffed by volunteers and
    that any help I receive is a selfless, heartfelt gift of their free time. I
    know I am not entitled to anything and will be polite and courteous.
  • [ x] I understand my issue may be closed if it becomes obvious I didn't
    actually perform all of these steps.

Thank you for adhering to this process! It ensures your issue is resolved
quickly and that neither your nor our time is needlessly wasted.

Issue Details

Provide a clear description of the problem, including the following key
questions:

  • What did you do?
    I installed You Complete Me and installed vim from source, following all the instructions here, but I still get this error message.
YouCompleteMe unavailable: requires Vim compiled with Python (2.6+ or 3.3+) support

Output of vim --version

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Mar 9 2017 13:23:37)
Included patches: 1-441
Compiled by zane@localhost
Huge version with GTK2 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 +terminfo
++builtin_terms +fork() +multi_lang +termresponse
+byte_offset +gettext -mzscheme +textobjects
+channel -hangul_input +netbeans_intg +timers
+cindent +iconv +num64 +title
+clientserver +insert_expand +packages +toolbar
+clipboard +job +path_extra +user_commands
+cmdline_compl +jumplist +perl +vertsplit
+cmdline_hist +keymap +persistent_undo +virtualedit
+cmdline_info +lambda +postscript +visual
+comments +langmap +printer +visualextra
+conceal +libcall +profile +viminfo
+cryptv +linebreak +python/dyn +vreplace
+cscope +lispindent +python3/dyn +wildignore
+cursorbind +listcmds +quickfix +wildmenu
+cursorshape +localmap +reltime +windows
+dialog_con_gui +lua +rightleft +writebackup
+diff +menu +ruby +X11
+digraphs +mksession +scrollbind -xfontset
+dnd +modify_fname +signs +xim
-ebcdic +mouse +smartindent +xpm
+emacs_tags +mouseshape +startuptime +xsmp_interact
+eval +mouse_dec +statusline +xterm_clipboard
+ex_extra -mouse_gpm -sun_workshop -xterm_save
+extra_search -mouse_jsbterm +syntax
+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"
system gvimrc file: "$VIM/gvimrc"
user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "
/.vim/gvimrc"
defaults file: "$VIMRUNTIME/defaults.vim"
system menu file: "$VIMRUNTIME/menu.vim"
fall-back for $VIM: "/usr/share/vim"
f-b for $VIMRUNTIME: "/usr/share/vim/vim80"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/harfbuzz -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -L/build/buildd/ruby1.9.1-1.9.3.484/debian/lib -rdynamic -Wl,-export-dynamic -Wl,-E -L/usr/local/lib -Wl,--as-needed -o vim -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfontconfig -lgobject-2.0 -lglib-2.0 -lfreetype -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm -ltinfo -lnsl -lselinux -ldl -L/usr/lib -llua5.1 -Wl,-E -fstack-protector -L/usr/local/lib -L/usr/lib/perl/5.18/CORE -lperl -ldl -lm -lpthread -lcrypt -lruby-1.9.1 -lpthread -lrt -ldl -lcrypt -lm -L/usr/lib

Output of YcmDebugInfo

Not an editor command

OS version, distribution, etc.

Ubuntu 14.04

@puremourning

This comment has been minimized.

Collaborator

puremourning commented Mar 14, 2017

@zwhitchcox

This comment has been minimized.

zwhitchcox commented Mar 14, 2017

0 and 0

I'm on linux, not a pc

@puremourning

This comment has been minimized.

Collaborator

puremourning commented Mar 14, 2017

OK, that confirms what I suspected. The problem is that the Python is not available in your Vim. Probably because the dll (shared objects are dlls too) is not being loaded. This is a problem with your Vim or your environment, not YCM, so closing.

@liuyangzys

This comment has been minimized.

liuyangzys commented Mar 14, 2017

Please check your python version. The 3.6.0 is not supported by vim!

@zwhitchcox

This comment has been minimized.

zwhitchcox commented Mar 14, 2017

Thanks I fixed it

@trananhkma

This comment has been minimized.

trananhkma commented Mar 21, 2017

@zwhitchcox Hi, How can you fix this? I also meet this problem. I have same environment with you: Vim 8.0 and Ubuntu 14.04. My Python versions are 2.7.6 and 3.4.3.
I have already re-compiled manualy but it cannot solve the problem.

@zwhitchcox

This comment has been minimized.

zwhitchcox commented Mar 21, 2017

I amended the wiki with special instructions for ubuntu 14.04...you have to choose python 2 or python 3...you can't compile vim with both

@trananhkma

This comment has been minimized.

trananhkma commented Mar 21, 2017

Thank you so much! I fixed this problem as well.

@lyuyuan92

This comment has been minimized.

lyuyuan92 commented Mar 31, 2017

https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source
This is a very helpful ticket. For ubuntu 14.04, vim could not be compile with py 2 and 3 together.

@sathiz1993

This comment has been minimized.

sathiz1993 commented Jul 3, 2017

Same error encountered in debian 9 and vim 8.0. how to fix

@jtumano

This comment has been minimized.

jtumano commented Jul 25, 2017

For debian 9 I used next cmd:
sudo apt install vim-python-jedi

@tomecho

This comment has been minimized.

tomecho commented Jan 1, 2018

Although it was specifically written in the docs that the issue was with 14.04, it seems like it fixed the issues I was having on 16.04

@brandonsturgeon

This comment has been minimized.

brandonsturgeon commented May 30, 2018

A previous commenter said python 3.6.0 isn't supported? I can't find any documentation to back up that claim. I have 3.7 right now and I'm facing this problem, but I also configured VIM with both python versions (which was said to be a problem in this ticket: #1907):

--enable-pythoninterp=yes 
--with-python-config-dir=/usr/lib/python2.7/config 
--enable-python3interp=yes 
--with-python3-config-dir=/usr/lib/python3.7/config

Can anyone confirm that 3.6+ is not supported?

@micbou

This comment has been minimized.

Collaborator

micbou commented May 30, 2018

A previous commenter said python 3.6.0 isn't supported?

Python 3.6 is in fact supported and 3.7 should work too (I tried 3.7.0b4 on Windows and it's working fine). The important part is that Vim must be compiled for that version and be able to find and load the corresponding Python library (:echo has( 'python3' ) must return 1).

@Awkee

This comment has been minimized.

Awkee commented Sep 21, 2018

  1. Run this command to check python feature , "+" means support , "-" means vim is compiled without python feature.
$ vim --version |grep python
+comments          +libcall           -python/dyn        +viminfo
+conceal           +linebreak         -python3/dyn       +vreplace
  1. Modify your vim source src/Makefile to support python feature

https://github.com/Valloric/YouCompleteMe/wiki/how-to-build-vim-from-source-with-python-support-feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment