我对 VIM 有疑问。我正在尝试根据https://github.com/davidhalter/jedi-vim安装 jedi-vim 但是当我打开 vim 时,它会报告这样的错误:
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
当我在 vim 中使用 Ctrl+Space 时,它会导致
Error detected while processing function jedi#completions:
line 1:
Traceback (most recent call last):
Press ENTER or type command to continue
事实上,从命令行导入 os 时我没有收到任何错误..
import os
os,
module 'os' from '/usr/local/install/python-2.7.5/lib/python2.7/os.pyc'
有人知道如何解决这个错误吗?谢谢。