vim --version.:YcmDebugInfo.:YcmToggleLogs command.install.py (or cmake/make/ninja) including its invocationI can't get YCM to work on a python3 file, the server errors and I get no autocomplete data. I installed YMC on neovim using dein, with python3.6 from anaconda3 and it compiled without errors. Also the tests appear fine (please check below).
However for some reason the server errors.
./run_tests.pyRan 278 tests in 124.604s
OK (SKIP=3)
vim --versionNVIM v0.2.0-dev
Build type: RelWithDebInfo
Compilation: /usr/bin/x86_64-linux-gnu-gcc -g -O2 -fdebug-prefix-map=/build/neovim-spJi9u/neovim-0.1.7ubuntu1+git201703
271904+3269+23~ubuntu16.10.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wconversion -U_FORTIFY_SOURCE
-D_FORTIFY_SOURCE=1 -O2 -g -DDISABLE_LOG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99
-Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -DHAVE_CONFIG_H -D_GNU_SOURCE
-I/build/neovim-spJi9u/neovim-0.1.7ubuntu1+git201703271904+3269+23~ubuntu16.10.1/build/config -I/build/neovim-spJi9u/ne
ovim-0.1.7ubuntu1+git201703271904+3269+23~ubuntu16.10.1/src -I/build/neovim-spJi9u/neovim-0.1.7ubuntu1+git201703271904+
3269+23~ubuntu16.10.1/.deps/usr/include -I/build/neovim-spJi9u/neovim-0.1.7ubuntu1+git201703271904+3269+23~ubuntu16.10.
1/.deps/usr/include -I/build/neovim-spJi9u/neovim-0.1.7ubuntu1+git201703271904+3269+23~ubuntu16.10.1/.deps/usr/include
-I/build/neovim-spJi9u/neovim-0.1.7ubuntu1+git201703271904+3269+23~ubuntu16.10.1/.deps/usr/include -I/build/neovim-spJi
9u/neovim-0.1.7ubuntu1+git201703271904+3269+23~ubuntu16.10.1/.deps/usr/include -I/build/neovim-spJi9u/neovim-0.1.7ubunt
u1+git201703271904+3269+23~ubuntu16.10.1/.deps/usr/include -I/usr/include -I/build/neovim-spJi9u/neovim-0.1.7ubuntu1+gi
t201703271904+3269+23~ubuntu16.10.1/build/src/nvim/auto -I/build/neovim-spJi9u/neovim-0.1.7ubuntu1+git201703271904+3269
+23~ubuntu16.10.1/build/include
Compiled by root@lcy01-03
Optional features included (+) or not (-): +acl +iconv +jemalloc +tui
For differences from Vim, see :help vim-differences
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim"
YcmDebugInfoPrinting YouCompleteMe debug information...
-- Client logfile: /tmp/ycm_pqqz2vmp.log
-- Server errored, no debug info from server
-- Server running at: http://127.0.0.1:35379
-- Server process ID: 19577
-- Server logfiles:
-- /tmp/ycmd_35379_stdout_zj1rocwk.log
-- /tmp/ycmd_35379_stderr_q9n5vc0h.log
/tmp/ycm_y23uhmoi.log: gist
ycmd_stderr:
2017-03-28 12:28:51,118 - ERROR - ycm_core library not detected; you need to compile it by running the build.py script. See the documentation for more details.
Traceback (most recent call last):
File "/home/florin/.config/nvim/dein/.cache/init.vim/.dein/third_party/ycmd/ycmd/server_utils.py", line 95, in CompatibleWithCurrentCore
ycm_core = ImportCore()
File "/home/florin/.config/nvim/dein/.cache/init.vim/.dein/third_party/ycmd/ycmd/server_utils.py", line 87, in ImportCore
import ycm_core as ycm_core
ImportError: No module named 'ycm_core'
ycmd_stderr: empty
OS: Ubuntu 16.10 x86_64
Kernel: 4.8.0-42-generic
~/Tools/anaconda3/bin/python3.6 install.py --clang-completer
Searching Python 3.6 libraries...
Found Python library: /home/florin/Tools/anaconda3/lib/libpython3.6m.so
Found Python headers folder: /home/florin/Tools/anaconda3/include/python3.6m
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /home/florin/Tools/anaconda3/bin/cc
-- Check for working C compiler: /home/florin/Tools/anaconda3/bin/cc -- works
-- Detecting C compiler ABI info
-- Checking if C linker supports --verbose
-- Checking if C linker supports --verbose - yes
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /home/florin/Tools/anaconda3/bin/c++
-- Check for working CXX compiler: /home/florin/Tools/anaconda3/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Checking if CXX linker supports --verbose
-- Checking if CXX linker supports --verbose - yes
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonLibs: /home/florin/Tools/anaconda3/lib/libpython3.6m.so (found suitable version "3.6.0", minimum required is "3.3")
Downloading Clang 4.0.0
-- [download 100% complete]
Using libclang to provide semantic completion for C/C++/ObjC
Using external libclang: /tmp/ycm_build_ndsf3dey/clang+llvm-4.0.0-x86_64-linux-gnu-ubuntu-14.04/lib/libclang.so.4
-- Found PythonInterp: /home/florin/Tools/anaconda3/bin/python3.6 (found version "3.6")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/ycm_build_ndsf3dey
[133/133] Linking CXX shared library /home/florin/.config/...ub.com/Valloric/YouCompleteMe/third_party/ycmd/ycm_core.so
Q: YouCompleteMe does not work. I have built YouCompleteMe manually.
A: dein.vim has merge feature. It copys the plugins into the merge directory.
So dein.vim does not know the manually built binary. It does not be copied.
You should disable the merge feature manually. >
call dein#add('Valloric/YouCompleteMe', {'merged': 0})
Another solution is to clear dein cache after building YCM with:
:call dein#recache_runtimepath()
and restart the server (:YcmRestartServer) or restart Vim.
@micbou thank you. I tried the second work-around you suggested and it worked just fine.
Most helpful comment
See the dein documentation:
Another solution is to clear dein cache after building YCM with:
and restart the server (
:YcmRestartServer) or restart Vim.