Vim YouCompleteMe Python subclasses are not detect

2019-09-09 01:25发布

问题:

I can TAB-complete current open file variables, paths & globals, but my python subclasses are not detected on TAB completion. For instance,

import os          # os is built-in library.
os.                # ycm does not complete members of this class.

It has been 48h that I'm searching the solution. My /usr/bin/python -> /usr/bin/python2.7, all the tests pass 100% and the build was successful.

> uname -r
4.0.5-1-ARCH

I tried installing packages specific to Arch Linux from repositories and they don't seem to work.

At this point, I think my best chance would be to find the place where the python path or a variable with this purpose is set in the original package for Vundle, YouCompleteMe. Then, I should be able to verify that it is correct. I am open to all possible solutions or insights on this issue.

> echo $PYTHONPATH

/usr/lib/python2.7/

Thank you for your time!

回答1:

YouCompleteMe relies on Jedi-Vim for python completion.

I just found that it was due to an incomprehension error that I described for Jedi Vim here. However, with YouCompleteMe plug-in only few methods shows up on:

from os import getc

Then I pressed ctrl + space and a complete list of available modules was displayed.