2

Case: Testing clang_complete with gVim 7.3

I installed MinGW, then followed the tutorial here to download and compile clang. It compiled for around an hour, then make install. Clang worked. I especially love the error annotation. It's amazing.

Now comes the case of clang_complete. I Installed it. I am using pathogen, so clang_complete fron github comes in bundle folder inside vimfiles.

I opened the vim editor and gave command :scriptnames. It shows clang_complete plugin. :version shows it has python entry, so vim was built with python support. Also my test system has python installed.

but whenever I issue :save foo1.cpp , vim give this error,

Error detected while processing function 14_ClangCompleteInit..14_initClangCompletePython: line2 clang_complete:No python support available line 3 cannot use clang library.

simply puzzled.

*I have python installed on my system. I Also tried using libclang library path for clang_complete as mentioned in another question on clang_complete here, but to no avail.*

Thank you.

Evdo Cdma
  • 45
  • 1
  • 4
  • Just to make sure but python is in your path right? – FDinoff May 20 '13 at 01:52
  • Could you add the lines in `:version` that show that you have python support? Also what version of Python do you have? – romainl May 20 '13 at 05:37
  • Looks like your Vim compiled without python support. – Alex Kroll May 20 '13 at 06:04
  • Python is in path. Issuing :version command includes +python/dyn and +pyhton3/dyn in the feature list. I am using gvim73 from [here](http://wyw.dcweb.cn/vim/gvim73.zip) and system has python-2.7.5 – Evdo Cdma May 20 '13 at 18:34

2 Answers2

4

Vim needs to be compiled with Python support, i.e. +python when doing :version. -python means it's not installed. Taken from clang_complete at Github:

You need Vim 7.3 or higher, compiled with python support and ideally, with the conceal feature.

You said you had this enabled, but it doesn't look like it. Taken from clang_complete.vim.
This is the only place that error message is defined and triggers on !has('python'). In other words this doesn't seem to be a clang_complete issue, but rather that your install is missing or is having problems with Python support.

function! s:initClangCompletePython()
  if !has('python')
    echoe 'clang_complete: No python support available.'
    echoe 'Cannot use clang library'
    echoe 'Compile vim with python support to use libclang'
    return 0
  endif
  [..]
timss
  • 9,982
  • 4
  • 34
  • 56
  • With Reference to Your first comment.. the vim editor has python as an included feature. (+python/dyn and +pyhton3/dyn ). I Studied the above function in conjunction with :version output..this is EXACTLY what puzzles me. – Evdo Cdma May 20 '13 at 18:41
  • @EvdoCdma Have you tried any other plugins that require `+python` to locate if it's an error with clang_complete or your install of Vim's Python support? – timss May 20 '13 at 19:33
  • I have tried ultisnips, and it is causing gvim to close down immediately. There are issues from python support on windows 8. Quite sure now. Thank you. – Evdo Cdma May 21 '13 at 18:16
  • @EvdoCdma Aye, I thought as much. It'd be -really- weird if something would make the basic `has()` function buggy. Hopefully you'll be able to solve whatever problem is related to Windows 8. Good luck. – timss May 21 '13 at 22:14
1

Just came across this issue, invoking :version returns for features:

-python
+python3

So it seems this is caused by incompatible plugin that requires python (e.g. 2.x) but only python 3.x is available.

lanoxx
  • 12,249
  • 13
  • 87
  • 142