Khotey Vitaliy
Khotey Vitaliy

Reputation: 519

YouCompleteMe error: Symbol not found: __PyCodecInfo_GetIncrementalDecoder

Installed YouCompleteMe (./install.py --tern-complete --clang-complete) for vim and have an error.

Error:

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

Upvotes: 1

Views: 1603

Answers (1)

Yihe
Yihe

Reputation: 4234

For me, the problem is Vim did not use the suitable Python version.

I solved it on my Mac by:

brew unlink python
brew link python

Discussion in ycm issue.

Upvotes: 1

Related Questions