Unable to go to definition using jedi-vim plugin on packages installed using pip install --user

769 Views Asked by At

I am able to goto definitions of functions imported from a package using jedi-vim when the package is installed in following directory:

/usr/lib64/python2.7/site-packages/

However when it is installed in the following directory, using pip install --user package_name, goto definition fails with error: jedi-vim: Couldn't find any definitions for this.

$HOME/.local/lib/python2.7/site-packages

import of package works in both cases.

Do I need additional configuration with jedi-vim to make sure that it jumps the definition even when the package is installed in $HOME/.local/lib/python2.7/ directory?

1

There are 1 best solutions below

0
On

Change all "safe=True" to "safe=False"( three times,to be exactly) in

~/.vim/bundle/jedi-vim/pythonx/jedi/jedi/api/environment.py

solved the problem for me.

Hope this can be useful.

Some relate links:

https://github.com/davidhalter/jedi-vim/issues/869

https://github.com/davidhalter/jedi-vim/issues/744