Skip to content
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

Error detected while processing youcompleteme.vim #2124

Closed
jcron22 opened this issue Apr 18, 2016 · 7 comments
Closed

Error detected while processing youcompleteme.vim #2124

jcron22 opened this issue Apr 18, 2016 · 7 comments

Comments

@jcron22
Copy link

jcron22 commented Apr 18, 2016

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.

@micbou
Copy link
Collaborator

micbou commented Apr 18, 2016

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')

?

@Cemenyave
Copy link

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

@puremourning
Copy link
Member

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,.

@micbou
Copy link
Collaborator

micbou commented Apr 24, 2016

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

@Cemenyave
Copy link

@micbou, thank you! That helped.

@njia
Copy link

njia commented Aug 18, 2016

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.

@jetsgit
Copy link

jetsgit commented Sep 30, 2016

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!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants