ncm2 / ncm2-jedi

MIT License
23 stars 11 forks source link

why my ncm2-jedi does not identify third-party module #7

Closed chcocoysfer closed 5 years ago

chcocoysfer commented 6 years ago

First of all ,thank you very much for doing great job .It works very well on my archlinux when I develop C program.But when I develop Python program , it can not identify third-party module like pandas,numpy.I use virtualenv python 3.6.5. Can you help me?

daskol commented 6 years ago

The same issue persists for me. Jedi plugin seems working properly with neo-complete-manager but not ncm2.

daskol commented 6 years ago

Well, actually the issue is caused be jedi since it does not support python 3.7 yet. Look at here for details.

chcocoysfer commented 6 years ago

But I use virtualenv python 3.6.5 ,so it should not concern about jedi‘s not support with python 3.7。@daskol

daskol commented 6 years ago

@chcocoysfer Ensure that you have set g:python_host_prog and g:python3_host_prog properly. Also, are you sure about python3.6.5 in your virtual env?

chcocoysfer commented 6 years ago

@daskol .Yes, I have set g:python3_host_prog properly and I install python3.6.5 in your virtual env, but I havent set g:python_host_prog. I find that ncm2-jedi use my system python2's site-packages as its source , which is /usr/bin/python. That is strange.

xrayw commented 6 years ago

@chcocoysfer It may caused by it. https://github.com/davidhalter/jedi/issues/1147#issuecomment-398145023 and ncm2-jedi just called the jedi.Script() method https://github.com/ncm2/ncm2-jedi/blob/master/pythonx/ncm2_jedi.py#L40. The method use the system python instead of your virtualenv‘s 。 I meet the same error when I use Pipenv.

jan-xyz commented 5 years ago

Do I understand correctly, that ncm2-jedi uses the same variable for code completion that is set for vim in general? I don't want to install neovim into every virutalenv that I am working on. Is there a way to separate the two?

roxma commented 5 years ago

You could use g:ncm2_jedi#environment to set the jedi environment for completion.