1

I'm trying to use the YouCompleteMe auto completion plugin.

I have installed MacVim version 7.4.

I followed the instructions on the linked page for Mac OS X by making the symlink:

ln -s /usr/local/bin/mvim vim

When installing the plugin with Vundle, I got some errors, which I unfortunately didn't copy or save. YCM however seems to be instaled.

When I open vim from the Terminal however, I get this, and there is no auto completion:

Traceback (most recent call last):
  File "<string>", line 19, in <module>
  File "/Users/user/.vim/bundle/YouCompleteMe/autoload/../python/ycm/setup.py", line 37, in SetUpSystemPaths
    from ycmd import server_utils as su
  File "/Users/user/.vim/bundle/YouCompleteMe/python/ycm/../../third_party/ycmd/ycmd/server_utils.py", line 25, in <module>
    import io
  File "/Users/user/anaconda/lib/python2.7/io.py", line 51, in <module
    import _io
ImportError: dlopen(/Users/user/anaconda/lib/python2.7/lib-dynload/_io.so, 2): Symbol not found: __PyCodecInfo_GetIncrementalDecoder
  Referenced from: /Users/user/anaconda/lib/python2.7/lib-dynload/_io.so
  Expected in: flat namespace
 in /Users/user/anaconda/lib/python2.7/lib-dynload/_io.so
YouCompleteMe unavailable: dlopen(/Users/user/anaconda/lib/python2.7/lib-dynload/_io.so, 2): Symbol not found: __PyCodecInfo_GetIncrementalDecoder
  Referenced from: /Users/user/anaconda/lib/python2.7/lib-dynload/_io.so
  Expected in: flat namespace
 in /Users/user/anaconda/lib/python2.7/lib-dynload/_io.so
Press ENTER or type command to continue
0

YouCompleteMe does not work with Anaconda Python.

Disable Anaconda by commenting out the relevant line from your ~/.bash_profile and then try to install YouCompleteMe again. After that you can reenable Anaconda.

0

I had a similar issue trying to get it set up and fixed it with this line in my .zshrc

export DYLD_FORCE_FLAT_NAMESPACE=1

might give that a shot and see if it resolves.

  • Hi Slerm. I think I have succesfully installed YCM now on another computer (running Ubuntu). I say "I think" because the plugin shows in my list of plugins, and there are no errors when I start vim. How do I actually 'activate' YCM? Should it automatically start to autocomplete? Because it does not seem like that is the case. – Mike Mar 6 '17 at 21:38
  • Yeah it should automatically start. Try running :YcmDebugInfo in vim and see if it's yelling about anything. – glaaki Mar 7 '17 at 16:38
  • Seems like I got it working on my PC running ubuntu, now I just have to get it running on my Mac. I tried your solution of putting export DYLD_FORCE_FLAT_NAMESPACE=1 in my .bashrc file (I use bash, not zshell), but that didn't work. On my Ubuntu PC I had to build the Python support separately, I will try that on my Mac. On my Ubuntu machine, it seems that general code is being completed, but not Python built-in functions. Do you know if I need a specific configuration file for Python? – Mike Mar 7 '17 at 22:02
  • I have let g:ycm_seed_identifiers_with_syntax = 1 set in my .vimrc and that seems to help with the built-ins. – glaaki Mar 8 '17 at 15:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.