Open sham332 opened 5 months ago
Hello @sham332 two quick questions; is this quite a new setup of vim with a clean install of python or/and do you have $HOME~
?
For the second one try removing one of the variables $HOME
or ~
. The path you have should be the default and not required for you to set.
The first question may lead to some new python updates that I have just really noticed and it doesn't let you install plugins unless in a virtual python environment. I have done a test with this including in the code but it would need to be made clean to push. Try to manually install the jira
plugin for your python outside of vim
and this will show you if it is allowed.
Tried the suggestion to remove $HOME and it gives same error. Also I had installed Jira plugin manually and it is present
➜ ~ pip list | grep jira jira 3.6.0
I suspect the python that is running in Vim is not somehow finding this library
I had this issue on a mac before.
You can see which version of python is being used in within vim by running py print(sys.executable)
.
I'm on Linux now and my output is /usr/bin/python
.
Then you can install the vira requirements using the absolute python path:
/usr/bin/python -m pip install -r ~/.vim/plugged/vira/requirements.txt
Thanks @mikeboiko . I tired what you suggested. Got the python version inside vim by running this command
!python -c "exec(\"import sys\nprint(sys.executable)\")"
And then did installation of the vira requirements and it still fails with same error
/Users/test/.pyenv/versions/3.9.1/bin/python -m pip install -r ~/.vim/plugged/vira/requirements.txt
The vim from Mac isn't built using python and I had to install vim via brew.
@sham332, ok just to confirm, now that you've installed the homebrew
version of vim
, you're seeing +python3
in the compilation flags?
This is what mine looks like:
╭─mike@asus ~
╰─➤ vim --version | grep python3
+cmdline_info +libcall +python3/dyn +virtualedit
Secondly, you should run this command inside vim to check the python version: :py print(sys.executable)
.
I'm pretty sure the command you ran, starting with !, is using your shell's python.
I tried the aboved command before as well. It gives error saying command not avaliable
:py print(sys.executable)
error is `
E319: Sorry, the command is not available in this version
`
I am trying to setup this plugin with vim on macbook. It is throwing below error. Any idea how to fix this?
My Vimrc settings is as below
Python on terminal is using
Vim is from brew install