2

I want to use deoplete with neovim using python3 as default.

I am trying to set up deoplete for neovim supported with deoplete-deji. I have installed both correctly, and it works as expected, but only for python 2. I have confirmed this by running sys.version_info which shows python2.

Things i have done so far are:

  • installed the plugins.
    • zchee/deoplete-jedi
    • Shougo/deoplete.nvim
  • installed neovim using pip and pip3

set the following deoplete configurations:

let g:deoplete#enable_at_startup = 1
let g:deoplete#file#enable_buffer_path = 1
let g:deoplete#enable_smart_case = 1
let g:deoplete#enable_at_startup = 1
let g:deoplete#file#enable_buffer_path = 1
let g:deoplete#enable_smart_case = 1

When i used let g:loaded_python_provider = 1, everything works as expected, but when i change it to let g:loaded_python3_provider = 1, i am getting Vim(let):E117: Unknown function: provider#python3#Prog when running UpdateRemotePlugins

I am a bit opposed to creating an alias, because i want python to point to python2

Long story short, trying to make python3 default for everything in neovim including deoplete and jedi Thanks!

2 Answers 2

3

After looking through the docs, deoplete jedi searches for python in PATH. Setting g:deoplete#sources#jedi#python_path = 'python3' is the solution.

Sign up to request clarification or add additional context in comments.

Comments

1

I have been facing this kind of problem, so, in the error messages I saw something related with gcc, then I started searching for the development packs for my linux distro (voidlinux). The solution came when I installed:

python3-pip python3-devel python-devel base-devel xclip neovim

And the neovim library to python3 and python3

sudo pip install neovim
sudo pip3 install neovim

All this was only possible due to the command:

:checkhealt

The deoplate plugin website has also a recommendation:

:UpdateRemotePlugins

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.