Deoplete.nvim: [deoplete] You need to set g:python3_host_prog.

Created on 11 Feb 2019  路  5Comments  路  Source: Shougo/deoplete.nvim

Warning: I will close the issue without the minimal init.vim and the reproduction instructions.

Problems summary

I keep getting this error, my config is on github if you need closer inspection

[deoplete] You need to set g:python3_host_prog.

I tried :UpdateRemotePlugins
I tried pinning msgpack to 5.1
:checkhealth says deoplete is finding my python executable

Expected

deoplete finds my python exectutable

Environment Information

MacOS Mojave

  • deoplete version (SHA1):
    Newest

  • OS:
    MacOS Mojave

  • neovim/Vim :version output:

NVIM v0.3.4
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict
-prototypes -std=gnu99 -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I
/tmp/neovim-20190113-94620-d8vv4n/neovim-0.3.4/build/config -I/tmp/neovim-20190113-94620-d8vv4n/neovim-0.3.4/src -I/usr/local/include -I/usr/local/opt/gettext/include -I/Applications/Xcode.app/Contents/De
veloper/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/tmp/neovim-20190113-94620-d8vv4n/neovim-0.3.4/build/src/nvim/auto -I/tmp/neovim-20190113-94620-d8vv4n/neovim-0.3.4/build/inc
lude
Compiled by [email protected]

Features: +acl +iconv +jemalloc +tui
See ":help feature-compile"

system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/local/Cellar/neovim/0.3.4/share/nvim"

  • :checkhealth or :CheckHealth result(neovim only):

Provide a minimal init.vim/vimrc with less than 50 lines (Required!)

set runtimepath+=~/.config/nvim/dein/repos/github.com/Shougo/dein.vim

if dein#load_state('~/.config/nvim/dein')
  call dein#begin('~/.config/nvim/dein')

  call dein#add('~/.config/nvim/dein/repos/github.com/Shougo/dein.vim')
  call dein#add('Shougo/deoplete.nvim')
  if !has('nvim')
    call dein#add('roxma/nvim-yarp')
    call dein#add('roxma/vim-hug-neovim-rpc')
  endif

  call dein#end()
  call dein#save_state()
endif

let g:python3_host_prog = '~/Miniconda/envs/neovim/bin/python3.7'
let g:deoplete#enable_at_startup = 1

How to reproduce the problem from neovim/Vim startup (Required!)

  1. nvim

Generate a logfile if appropriate

  1. export NVIM_PYTHON_LOG_FILE=/tmp/log
  2. export NVIM_PYTHON_LOG_LEVEL=DEBUG
  3. nvim -u minimal.vimrc
  4. some works
  5. cat /tmp/log_{PID}

Screenshot (if possible)

Upload the log file

log.txt

Most helpful comment

let g:python3_host_prog = '~/Miniconda/envs/neovim/bin/python3.7'

You must use expand for it.
It does not expanded automatically.

let g:python3_host_prog = expand('~/Miniconda/envs/neovim/bin/python3.7')

All 5 comments

Ok so I was able to get it to work with my base python3 installation just not Miniconda. Which I don't understand at all because Miniconda works fine for everything else.

This may be something you want to take a look at or not but I'll close for now.

let g:python3_host_prog = '~/Miniconda/envs/neovim/bin/python3.7'

You must use expand for it.
It does not expanded automatically.

let g:python3_host_prog = expand('~/Miniconda/envs/neovim/bin/python3.7')

Thanks that worked

I think this info should be added to doc\deoplete.txt FAQ.

Since this is the top Google result for this issue, I figured I'd add the fix for a slightly different manifestation.

I had the following in my init.vim:

let路g:python3_host_prog = "$HOME/.venvs/vim/bin/python"

afaict neovim successfully expanded this, as :checkhealth reported no problems. Deoplete requires that you pull the $HOME out of the string to work however, as follows:

let路g:python3_host_prog = $HOME."/.venvs/vim/bin/python"
Was this page helpful?
0 / 5 - 0 ratings

Related issues

monicao picture monicao  路  3Comments

tcstory picture tcstory  路  5Comments

pr4th4m picture pr4th4m  路  4Comments

tomspeak picture tomspeak  路  5Comments

pappasam picture pappasam  路  4Comments