Search code examples
vimvim-pluginjedi-vim

jedi-vim: modules from non-standard paths


I have different local python installations that were built with hashdist. On the other hand, vim is installed system-wide (ArchLinux) referencing the system's python3.

I would like to use jedi's autocompletion for packages of one isolated python build. The modules lie in some/path/lib/python2.7/site-packages which is not known to the system python (hence, vim). Also, vim was compiled for python3; that "other version" is python2.7.

Is there any way to do this? If I could just pick one specific package that would be fine, too. $PYTHONPATH doesn't work (at least) because of the conflicting python versions.


Solution

  • Jedi intentionally only works for the same Python version, because compiled packages might cause seg faults (when loading them). Therefore this is not something that is even intended by Jedi.

    However you can modify the sys.path in jedi-vim itself, if you want to play with it :python3 sys.path.append(). But that's really not recommended.