本文介绍了Jedi-vim不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对VIM有问题.我正在尝试根据 https://github.com/davidhalter/jedi-vim 但是当我打开vim时,它报告了这样的错误:

I have a issue with VIM. I'm trying to install jedi-vim according to https://github.com/davidhalter/jedi-vimbut 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

当我在vim中使用Ctrl + Space时,它会导致

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

实际上,从命令行导入os时没有任何错误.

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.

推荐答案

请确保您的VIM出现问题.您可能在Mac上使用了vim,而sys.path出了点问题.

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.

您应该能够在VIM中使用:python import os.如果那不起作用,绝地肯定不会.

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

这篇关于Jedi-vim不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 00:57