YouCompleteMe unavailable: unable to load Python.

Created on 16 Feb 2019  路  8Comments  路  Source: ycm-core/YouCompleteMe

Issue Prelude

  • [x] I have read and understood YCM's CONTRIBUTING document.
  • [x] I have read and understood YCM's CODE_OF_CONDUCT document.
  • [x] I have read and understood YCM's README, especially the
    Frequently Asked Questions 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.
    )
  • [x] If filing a bug report, I have included the output of vim --version.
  • [x] If filing a bug report, I have included the output of :YcmDebugInfo.
  • [ ] If filing a bug report, I have attached the contents of the logfiles using
    the :YcmToggleLogs command.
  • [x] If filing a bug report, I have included which OS (including specific OS
    version) I am using.
  • [x] 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] If filing a installation failure report, I have included the entire output
    of install.py (or cmake/make/ninja) including its invocation
  • [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

I attempted to install YCM according to instructions but got a warning after installation and when starting vim: YouCompleteMe unavailable: unable to load Python. YCM does not appear to be installed.

Might be helpful:

python --version outputs:
Python 2.7.13

python3 --version outputs:
Python 3.5.3

  • What did you do?
    Install YCM with Vundle
    Run ./install.py --ts-completer

  • What did you expect to happen?
    No error/warning would appear when starting vim and YCM would be installed

  • What actually happened?
    After installation was completed, said warning appeared. Same warning appears when starting vim.
    YCM does not appear to be installed.

Diagnostic data

Output of vim --version

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Sep 30 2017 18:21:38)
Included patches: 1-197, 322, 377-378, 550, 703, 706-707
Modified by [email protected]
Compiled by [email protected]
Huge version without 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 +vreplace
+cscope +lispindent -python3 +wildignore
+cursorbind +listcmds +quickfix +wildmenu
+cursorshape +localmap +reltime +windows
+dialog_con -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
+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"
defaults file: "$VIMRUNTIME/defaults.vim"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -Wdate-time -g -O2 -fdebug-prefix-map=/build/vim-R2d1UQ/vim-8.0.0197=. -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lm -ltinfo -lnsl -lselinux -lacl -lattr -lgpm -ldl

Output of YcmDebugInfo

E492: Not an editor command: YcmDebugInfo

Contents of YCM, ycmd and completion engine logfiles

Output of YcmToggleLogs

E492: Not an editor command: YcmToggleLogs

OS version, distribution, etc.

Debian GNU/Linux 9

Output of build/install commands

https://gist.github.com/ioanniswd/3ce2ae919f9b7e0af6273b1b2139aa44

Most helpful comment

pip install neovim

All 8 comments

+cryptv +linebreak -python +vreplace
+cscope +lispindent -python3 +wildignore

Your vim doesn't have python support.

That was so fast :)
Thank you

Your vim doesn't have python support.

The message would be different in that case. The output of vim --version is not from the right Vim. Anyway, the error means what it says: neither Python 2 and Python 3 can be loaded inside your Vim. You can confirm that by trying to run :py pass and :py3 pass on the command-line in Vim. You should get an error for each command.

I did get an error. I ran sudo apt install vim-gtk and it is solved.

pip install neovim

Arch linux: Install community/python-neovim

Your vim doesn't have python support.

The message would be different in that case. The output of vim --version is not from the right Vim. Anyway, the error means what it says: neither Python 2 and Python 3 can be loaded inside your Vim. You can confirm that by trying to run :py pass and :py3 pass on the command-line in Vim. You should get an error for each command.

I have come across the same problem. Mine is mac. There is only error for :py3 pass. I have tried pip install neovim. @micbou

Your vim doesn't have python support.

The message would be different in that case. The output of vim --version is not from the right Vim. Anyway, the error means what it says: neither Python 2 and Python 3 can be loaded inside your Vim. You can confirm that by trying to run :py pass and :py3 pass on the command-line in Vim. You should get an error for each command.

I have come across the same problem. Mine is mac. There is only error for :py3 pass. I have tried pip install neovim. @micbou

my env is mac too, and there is only error for :py3 pass. I tried pip install neovim, but I still got this error

Was this page helpful?
0 / 5 - 0 ratings