Jedi-vim doesn't work

拜拜、爱过 提交于 2020-01-04 07:18:31

问题


I have a issue with VIM. I'm trying to install jedi-vim according to https://github.com/davidhalter/jedi-vim but when I open vim, it report such error:

initialize.py" 25L, 831C'import site' failed; use -v for traceback

Error detected while processing /home/.../.vim/autoload/jedi.vim:

line 285

Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File "/home/.../.vim/initialize.py", line 10, in <module>

    import os

ImportError: No module named os

And when I use Ctrl+Space in vim, it results in

Error detected while processing function jedi#completions:                                                               

line    1:

Traceback (most recent call last):

Press ENTER or type command to continue

In fact, I don't get any error when importing os from the command line..

import os

os,

module 'os' from '/usr/local/install/python-2.7.5/lib/python2.7/os.pyc'

Anybody know how to solve this error?Thank You.


回答1:


Pretty sure that there's something wrong with your VIM. You're probably using vim on mac and there's something wrong with the sys.path.

You should be able to use :python import os in VIM. If that doesn't work, Jedi certainly won't.



来源:https://stackoverflow.com/questions/27276517/jedi-vim-doesnt-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!