Deoplete.nvim: No module named script_host

Created on 16 Mar 2016  Â·  10Comments  Â·  Source: Shougo/deoplete.nvim

Problems summary

Autocomplete works correctly.

But neovim throw below error messages at first time opening .js file.

problem occurred after update today morning.

:echo has("python") = 1

_Error message_

function provider#python#Call[9]..remote#host#Require[13]..provider#pythonx#Require, 15 줄
Vim(if):Channel was closed by the client
Failed to load python host. You can try to see what happened by starting Neovim with the environment variable $NVIM_
PYTHON_LOG_FILE set to a file and opening the generated log file. Also, the host stderr will be available in Neovim
log, so it may contain useful information. See also ~/.nvimlog.

.nvimlog

2016/03/16 10:51:16 [error @ forward_stderr:333] 71989 - Channel 1 stderr: Traceback (most recent call last):
  File "<string>", line 1, in <module>

2016/03/16 10:51:16 [error @ forward_stderr:333] 71989 - Channel 1 stderr:   File "/Users/minhyeong/Library/Python/2.7/lib/python/site-packages/neovim/__init__.py", line 66, in start_host
    host.start(plugins)
  File "/Users/minhyeong/Library/Python/2.7/lib/python/site-packages/neovim/plugin/host.py", line 47, in start
    lam
2016/03/16 10:51:16 [error @ forward_stderr:333] 71989 - Channel 1 stderr: bda: self._load(plugins))
  File "/Users/minhyeong/Library/Python/2.7/lib/python/site-packages/neovim/api/common.py", line 244, in run
    self._session.run(filter_request_cb, filter_notification_cb, setup_cb)
  File "/Users/minhyeong/Library/Python/2.7/l
2016/03/16 10:51:16 [error @ forward_stderr:333] 71989 - Channel 1 stderr: ib/python/site-packages/neovim/msgpack_rpc/session.py", line 118, in run
    raise self._setup_exception
ImportError: No module named script_host

2016/03/16 10:51:16 [error @ call_set_error:743] 71989 - msgpack-rpc: Channel was closed by the client
2016/03/16 10:51:16 [info @ main:533] 71989 - Starting Neovim main loop.

Expected

Environment Information

  • OS: OS X El Capitan 10.11.3
  • Neovim version: NVIM v0.1.3-347-gc94575f

Most helpful comment

@minhyeong-kim Hi :)

It seems you use old neovim's python-client module.
Could you try this commands?

pip2 --no-cache-dir install -U neovim
pip3 --no-cache-dir install -U neovim

It will be install python-client latest version.

If you still have any errors, Please re-post error messages.

All 10 comments

@minhyeong-kim Hi :)

It seems you use old neovim's python-client module.
Could you try this commands?

pip2 --no-cache-dir install -U neovim
pip3 --no-cache-dir install -U neovim

It will be install python-client latest version.

If you still have any errors, Please re-post error messages.

@zchee pip2 --no-cache-dir install -U neovim fix my issue. thank you :+1:

Why neovim python-client module use both python versions?

@minhyeong-kim :tada:
deoplete.nvim is use python3 only. So, you not required python2 neovim's python-client module.
I wrote a pip2 just in case

but, You call a :echo has('python') as a test command. That is check python2.
Correct python3 check, :echo has('python3') :)

Close.

Thanks, I had the same error/issue.

Thanks too.

Had this issue today. Thanks for the fix @zchee

Just got this. Using NVIM 0.1.5 with the neovim-0.1.9 pip3 module.

→  pip3 --no-cache-dir install -U neovim
Collecting neovim
  Downloading neovim-0.1.9.tar.gz
Requirement already up-to-date: msgpack-python>=0.4.0 in /usr/local/lib/python3.5/site-packages (from neovim)
Requirement already up-to-date: greenlet in /usr/local/lib/python3.5/site-packages (from neovim)
Installing collected packages: neovim
  Running setup.py install for neovim ... done
Successfully installed neovim-0.1.9

However, deoplete seems to be using python 2:

→  nvim
function provider#python#Call[9]..remote#host#Require[13]..provider#pythonx#Require, line 15
Vim(if):Channel was closed by the client
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Library/Python/2.7/site-packages/neovim/__init__.py", line 66, in start_host
    host.start(plugins)
(snip)

(Note the /Library/Python/2.7/... line)

I have Python3 installed via Homebrew, though.

 →  python --version
Python 2.7.11

→  python3 --version
Python 3.5.1

This fixes it:

let g:loaded_python_provider = 1

See :help g:loaded_python_provider for info.

@rstacruz hey, It seems to done of install the neovim module to Python3(your env seems 3.5) site-package. but maybe your Python2 neovim module is old.

Also, yeah, If not set the let g:loaded_python_provider = 1, neovim occur error even deoplete(or other neovim remote plugin) does not use the Python2.
Your error caused by neovim specific. not a bug on deoplete.nvim.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

callmekohei picture callmekohei  Â·  5Comments

rafi picture rafi  Â·  4Comments

monicao picture monicao  Â·  3Comments

ChristianChiarulli picture ChristianChiarulli  Â·  5Comments

marcus picture marcus  Â·  6Comments