Youcompleteme: Error detected while processing youcompleteme.vim

0

I'm running Windows 10, 64 bit Vim, 64 bit Python version 3.5.1.

I get the following error message every time I run Vim:

Error detected while processing D:\Program Files\Vim\myplugins\YouCompleteMe\autoload\youcompleteme.vim:

Line 716

E887: Sorry, this command is disabled, the Python's site module could not be loaded.

I've tried setting the g:ycm_path_to_python_interpreter as well as the g:ycm_python_binary_path to no avail. I've tried using 2.7.11 and 2.7.9 versions of python. There are no logs saved within %TEMP%/ycm_temp.

I am currently using this _vimrc:

set nocompatible

set runtimepath+=$VIM/myplugins/YouCompleteMe

filetype plugin indent on

I compiled the ycm_core using MSVC 14 and using python install.py --clang-complete which ran successfully with no errors.

I have only one version of python installed, with Vim installed from a recent build from micbou's bintray.

jcron22 picture jcron22  ·  18 Apr 2016

Most helpful comment

17

I tried every conceivable combination of installing Python and Vim on my MacBook using brew and nothing worked. For some reason the following did:

brew rm vim vim python
brew install python
brew install vim --override-system-vi
brew install macvim --override-system-vim
sudo brew linkapps macvim

Check installation:

otool -L (which vim) | grep -i python
/usr/local/Frameworks/Python.framework/Versions/2.7/Python (compatibility version 2.7.0, current version 2.7.0)

greadlink -f /usr/local/Frameworks/Python.framework/Versions/2.7
/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7

Above comes from Vim, YouCompleteMe and Python - making it work

by Oliver Schrenk.

Hope that helps some of you!
Cheers!

jetsgit picture jetsgit  ·  30 Sep 2016

All comments

0

This is not an issue with YCM but Vim not able to find Python on your system. You can confirm this by trying to run the command (for Python 2):

:py print('test')

inside Vim. You should get the same error message.

Now, we need to understand why Vim can't find Python 2 or 3. First, what is the output of the following commands in Vim:

:echo has('python')
:echo has('python3')

?

micbou picture micbou  ·  18 Apr 2016
0

Hello.

I have the same issue. In my case
:py print('test') returns the same error.

:echo has('python') and :echo has('python3') both reurns 1

Cemenyave picture Cemenyave  ·  24 Apr 2016
0

If you run vim with vim -nu NONE and then run :py print('test') and :py3 print('test') what happens?

If it doesn't work (you still get an error), then this is clearly not a YCM issue, and an issue with your installation of Vim and Python,.

puremourning picture puremourning  ·  24 Apr 2016
2

@Cemenyave Which version of Python 2 are you using? I think you are experiencing this Python 2.7.11 issue.

micbou picture micbou  ·  24 Apr 2016
0

@micbou, thank you! That helped.

Cemenyave picture Cemenyave  ·  24 Apr 2016
0

I had this problem with Linuxbrew vim. I believe that I installed vim before python so vim is build without python support. Make sure python is installed then install or upgrade vim fixed the problem for me.

njia picture njia  ·  18 Aug 2016
17

I tried every conceivable combination of installing Python and Vim on my MacBook using brew and nothing worked. For some reason the following did:

brew rm vim vim python
brew install python
brew install vim --override-system-vi
brew install macvim --override-system-vim
sudo brew linkapps macvim

Check installation:

otool -L (which vim) | grep -i python
/usr/local/Frameworks/Python.framework/Versions/2.7/Python (compatibility version 2.7.0, current version 2.7.0)

greadlink -f /usr/local/Frameworks/Python.framework/Versions/2.7
/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7

Above comes from Vim, YouCompleteMe and Python - making it work

by Oliver Schrenk.

Hope that helps some of you!
Cheers!

jetsgit picture jetsgit  ·  30 Sep 2016