Closed puraminy closed 3 years ago
You should show us what :python3 import sys; print(sys.version)
prints.
I'm pretty sure there's something wrong with your Vim's Python3 support.
You should show us what
:python3 import sys; print(sys.version)
prints.I'm pretty sure there's something wrong with your Vim's Python3 support.
It seems that I just showed part of what it returns. It prints:
3.5.2 (default, Jan 26 2021, 13:30:48)
[GCC 5.4.0 20160609]
If it's the version of python, I should say that I use python 3.7.10
, which is what python3 --version
or python --version
returns. I should say I use conda
virtual env.
It seems outside of conda python3 --version
returns 3.5.2
I managed to install python 3.7 system-wide and build vim using it. I installed:
sudo apt install python3.7
sudo apt install python3.7-dev
and finally built vim using:
cd ~
git clone https://github.com/vim/vim.git
cd vim
./configure --with-features=huge \
--enable-multibyte \
--enable-rubyinterp=yes \
--enable-python3interp=yes \
--with-python3-config-dir=$(python3.7-config --configdir) \
--enable-perlinterp=yes \
--enable-luainterp=yes \
--enable-gui=gtk2 \
--enable-cscope \
--prefix=/usr/local
make
sudo make install
Now it prints 3.7.10
in vim! and jedi is loaded!
I suggest you to point to what :python3 import sys; print(sys.version)
should return and match it with python3 --version
in README
Python 3.5 is not supported anymore by jedi-vim (since it is officially end-of-life). Happy you got it running with Python 3.7 :)
I installed vim from source on linux Ubuntu 16 by enabling python. You also pointed to check
python3 import sys; print(sys.version)
but you didn't say what it should return?! It returns:[GCC 5.4.0 20160609]
It's the output of :
vim --version | grep python
But I get the following error when I try to open a python file: