YouCompleteMe unavailable: No module named builtins

Created on 21 Jul 2017  路  22Comments  路  Source: ycm-core/YouCompleteMe

When I enter the vim will appear this mistake. what?

Most helpful comment

Great. To everyone encountering the issue, open a terminal, go to YCM folder (typically ~/.vim/bundle/YouCompleteMe), and run the following command:

git submodule update --init --recursive

If you still get the error, report back with a comment including your OS, your Vim version (vim --version), and the output of the command:

:py import pprint; pprint.pprint(sys.path)

inside Vim.

All 22 comments

Please follow the instructions in the issue template.

Also, can you paste the output of :messages?

the same problem in my YCM, if you solve it ,please paste the way,thanks.

Also, the mistake 'YouCompleteMe unavailable: No module named builtins"

This issue is going nowhere :/

There's no diagnostic data, required by CONTRIBUTING.md, but there are quite a few "me too" responses.

I'm going to close this for now. This is in the hope that someone experiencing the issue will open a new issue and provide the diagnostics requested so that we can get to the bottom of it.

It seems to be affecting multiple users, so we _do_ want to understand it, but unfortunately "me too" doesn't help us get closer to reproducing the issue.

But I had on other log information to provide . So which place can check the error log ?

Please see CONTRIBUTING.md

So pity. when I open vim and run the command ":YcmDebugInfo", it reports " Not an editor command: YcmDebugInfo". someplace went wrong

@Loncoder Could you post the output of :messages?

Hi, the command ":message",the error info shows in the following.
Traceback (most recent call last):
File "", line 22, in
File "/Users/lfyang/.vim/bundle/YouCompleteMe/autoload/../python/ycm/base.py", line 23, in
from builtins import * # noqa
ImportError: No module named builtins

If I'm not mistaken, builtins come from python-future. Have you updated ycmd's submodules?

@Loncoder What's the output of the command:

:py import pprint; pprint.pprint(sys.path)

in Vim? Maybe something is screwing up Python search path.

@bstaletic @micbou
Hey, sorry for posting on this thread instead of properly making a new issue.
Same exact problem as @Loncoder . :messages prints the same thing for me.

I'd like to add that YouCompleteMe worked perfectly for me, but then I just updated the submodule (first time updating it in like a year or more), and now the problem happens.

I ran @micbou 's command and it prints the following:

[u'/home/ajay/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/OmniSharpSe
rver',
 u'/home/ajay/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/gocode',
 u'/home/ajay/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/godef',
 u'/home/ajay/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/waitress',
 u'/home/ajay/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/bottle',
 u'/home/ajay/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP',
 u'/home/ajay/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/tern_runtim
e',
 u'/home/ajay/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/requests',
 u'/home/ajay/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/argparse',
 u'/home/ajay/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/racerd',
 u'/home/ajay/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/frozendict'
,
 u'/home/ajay/.vim/bundle/YouCompleteMe/third_party/requests-futures',
 u'/home/ajay/.vim/bundle/YouCompleteMe/third_party/ycmd',
 u'/home/ajay/.vim/bundle/YouCompleteMe/third_party/pythonfutures',
 u'/home/ajay/.vim/bundle/YouCompleteMe/python/ycm/../../third_party/ycmd',
 u'/home/ajay/.vim/bundle/YouCompleteMe/autoload/../python',
 '/usr/lib/python2.7',
 u'/home/ajay/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/python-futu
re/src',
 '/usr/lib/python2.7/plat-x86_64-linux-gnu',
 '/usr/lib/python2.7/lib-tk',
 '/usr/lib/python2.7/lib-old',
 '/usr/lib/python2.7/lib-dynload',
 '/usr/local/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages/PILcompat',
 '/usr/lib/python2.7/dist-packages/gtk-2.0',
 '/usr/lib/python2.7/dist-packages/ubuntu-sso-client',
 '_vim_path_']

What do you think can be the problem? Thanks a lot!

@chausies Looks good. Can you check if the file

/home/ajay/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/python-future/src/builtins/__init__.py

exists?

@micbou Sorry, I just realized that I didn't run the submodule update with the --init flag, and so most of the third_party folders were empty. Properly updating YCM, and then will report results.

Everything's working fine! Sorry for all the trouble. Thanks a lot.

Great. To everyone encountering the issue, open a terminal, go to YCM folder (typically ~/.vim/bundle/YouCompleteMe), and run the following command:

git submodule update --init --recursive

If you still get the error, report back with a comment including your OS, your Vim version (vim --version), and the output of the command:

:py import pprint; pprint.pprint(sys.path)

inside Vim.

@micbou Thank you so much. Such a pleasure to have the resultant answer at the end of a thread like this!

@micbou Great! That git submodule update --init --recursive command solve my problem!

@micbou Your god like git submodule update --init --recursive saved me!

thanks!!!! that help me @micbou

@micbou Thank you ver much

Was this page helpful?
0 / 5 - 0 ratings

Related issues

d0u9 picture d0u9  路  4Comments

vbextreme picture vbextreme  路  4Comments

Jzarecta picture Jzarecta  路  4Comments

blackode picture blackode  路  3Comments

hkurj picture hkurj  路  3Comments