-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can not execute a custom function which has python script inside it: no python provider found #9927
Comments
Well,
So, have you set that option or was it Nvim? In any case, Nvim considers Python 2 support to be disabled, so the behaviour that I would expect, is that it wouldn't even try to execute your function in the first place. |
No, in the init.vim, there is only the function definition. Do you mean I have to add the following setting:
and install python2 in my system? Possibly also set the |
I think you're confused by the fact that For Python 3, use Also consider changing the function to |
Changing from But it seems that I can not make python2 work. I am using Anaconda3. I create a python2 virtual environment and install pynvim inside that environment. Then I use the following settings:
After that, I start nvim with
It seems that python2 is still not loaded for some unknown reasons. So I can not call the function inside virtual env (still errors). |
You should only set |
Thanks for your kind explanations. Removing the line about |
nvim --version
: 0.4.0$TERM
: xterm-256colorSteps to reproduce
Using the following minimal
init.vim
:Actual behaviour
I got an error. The error message is:
For reference, the output of
:checkhealth provider
:It shows that Python3 is found.
But if I use the above minimal setting with vim, I can call the function and get a random number.
Expected behaviour
I can execute the function without error.
The text was updated successfully, but these errors were encountered: