Closed kuonb closed 3 years ago
Please post :python3 import sys; print(sys.version_info)
.
Same issue here. :python3 import sys; print(sys.version_info)
gives sys.version_info(major=3, minor=5, micro=2, releaselevel='final', serial=0)
Upon investigation there seems no good way to switch the python jedi-vim uses without re-building vim (which requires root and I do not have it). I resolved the problem by installing vim in my conda environment with conda install -c conda-forge vim
. That'll let jedi-vim use the python in this environment (with $PATH correctly set).
Closing, because no information was provided in the original issue.
Upon investigation there seems no good way to switch the python jedi-vim uses without re-building vim
Exactly, VIM is being built with one specific Python version.
jedi-vim doesn't work because the python version that is trying to execute is the old 3.5, so it naturally complains due to non-compatible code:
File "/home/user/.vim/plugged/jedi-vim/pythonx/parso/parso/parser.py", line 113 node_map: Dict[str, type] = {} ^ SyntaxError: invalid syntax
I have tried a bunch of things without any luck, including:
let jedi#force_py_version=3.8
or installing deoplete-jedilet g:deoplete#sources#jedi#python_path = '/usr/bin/python3.8'
I am using a virtualenv, but even if I deactivate it, my default '/usr/bin/python3' links to the 3.8 version. My PATH and VIRTUAL_ENV seem to be in order... so, how does jedi-vim deliberately choose to execute python3.5? Is there any way to force it to look at a specific path?