惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Proofpoint News Feed
云风的 BLOG
云风的 BLOG
Apple Machine Learning Research
Apple Machine Learning Research
Hugging Face - Blog
Hugging Face - Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Google DeepMind News
Google DeepMind News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
雷峰网
雷峰网
B
Blog
月光博客
月光博客
博客园 - 【当耐特】
WordPress大学
WordPress大学
Microsoft Azure Blog
Microsoft Azure Blog
I
InfoQ
The GitHub Blog
The GitHub Blog
Engineering at Meta
Engineering at Meta
Jina AI
Jina AI
博客园 - Franky
MyScale Blog
MyScale Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Last Week in AI
Last Week in AI
B
Blog RSS Feed
H
Help Net Security

jdhao's digital space

Conversion between base64 and OpenCV or PIL Image 腾讯云对象存储博客图床开启 CDN 加速(不需要购买额外域名) Search and Replace in Multiple Files in Vim/Neovim Change Table Column Width in LaTeX Image or Table Side by Side in LaTeX LaTeX 并排显示图像或表格 Firenvim: Neovim inside Your Browser Content inside HTML tags missing in Latest Hugo? Creating Markdown Front Matter with Ultisnips Labelme JSON 标注格式转 voc XML 格式 Nifty Nvim Techniques That Make My Life Easier -- Series 6 macOS 下如何为视频制作字幕 Running Command Asynchronously inside Neovim Resolving Merge Conflict after Git Stash Pop Pylint: command not found? A Hands-on Experience with Neovim's Built-in LSP Support How to Convert PDF to Images with Imagemagick 互联网上常用缩略语集锦 File Backup in Neovim Converting PDF Pages to Images with Poppler Nifty Nvim Techniques That Make My Life Easier -- Series 5 Neovim Configuration for System-wide Use How to sort a list of tuple or list in Python -- lambda or itemgetter? Building A Vim Statusline from Scratch 人类第一颗原子弹爆炸始末 Distributed Training in PyTorch with Horovod Learning Expect Programming Essential Knowledge about SSH Nifty LaTeX Techniques -- Series 1 更改 Adsense 邮寄地址,重新寄送 PIN
Deoplete Failed to Load at Startup after Updating Python ...
2018-11-19 · via jdhao's digital space

Today when I use :checkhealth to check if there are anything wrong with my Neovim and related packages. I got an info that Python neovim package is not up to date. So I tried to update neovim with pip install --upgrade neovim. This is the start of a disaster which wastes me several hours.

After the upgrade, when I open Neovim, it complains:

UltiSnips requires py >= 2.7 or py3

I add the following setting in my init.vim:

let g:python3_host_prog='/home/jdhao/tools/anaconda3/bin/python'

The above warning message disappears. Each time I open nvim, I see the error message:

[deoplete] deoplete failed to load. Try the :UpdateRemotePlugins command and restart Neovim. See also :checkhealth.

I follow the guide and use :UpdateRemotePlugins command. Then I got another error message:

function remote#host#UpdateRemotePlugins[6]..<SNR>36_RegistrationCommands[15]..remote#host#Require[10]..provider#pythonx#Require[13]..provider#Poll, line 4
Vim(if):ch 3 was closed by the client
function remote#host#UpdateRemotePlugins[6]..<SNR>36_RegistrationCommands[15]..remote#host#Require[10]..provider#pythonx#Require[13]..provider#Poll, line 14
Failed to load python3 host. You can try to see what happened by starting nvim with $NVIM_PYTHON_LOG_FILE set and opening the generated log file. Also, the host stderr is available in messages.
remote/host: generated rplugin manifest: /home/jdhao/.local/share/nvim/rplugin.vim

I may also get the error message:

function remote#host#UpdateRemotePlugins[6]..<SNR>36_RegistrationCommands[15]..remote#host#Require[10]..provider#pythonx#Require[13]..provider#Poll, line 4
Vim(if):ch 3 was closed by the client
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'neovim'
function remote#host#UpdateRemotePlugins[6]..<SNR>36_RegistrationCommands[15]..remote#host#Require[10]..provider#pythonx#Require[13]..provider#Poll, line 14
Failed to load python3 host. You can try to see what happened by starting nvim with $NVIM_PYTHON_LOG_FILE set and opening the generated log file. Also, the host stderr is available in messages.
remote/host: generated rplugin manifest: /home/jdhao/.local/share/nvim/rplugin.vim

In fact, neovim is already installed and conda list|grep neovim shows:

neovim 0.3.1

I tried to unistall neovim and reinstall:

pip uninstall neovim
pip install neovim
# or pip install --no-cache-dir neovim

and the error was not gone. Installing the neovim package under user directory also does not work:

# does not work
pip install --user neovim

Why is neovim package not found but pip reports that neovim is installed? When I go to $ANACONDA_ROOT/Lib/site-packages, ls neovim* only shows the neovim egg/wheel info directory. There is acutually no package installed. That is the reason why neovim pacakge is not found.

Finally, I decided to do a complete uninstall and reinstall neovim. By complete uninstall, I mean to remove all dependency packages installed along with neovim. These dependency packages are:

After uninstalling these packages and reinstall neovim with pip install --no-cache-dir neovim, the error finally disappeared:

pip uninstall -y neovim pynvim msgpack greenlet
pip install neovim

Now, ls|grep neovim command in Anaconda Python site package directory shows:

205:neovim/ 206:neovim-0.3.1.dist-info/

So the neovim Python client is successfully installed. Now open neovim and use issue UpdateRemotePlugins command, you will see:

remote/host: python3 host registered plugins ['deoplete']
remote/host: generated rplugin manifest: /home/jdhao/.local/share/nvim/rplugin.vim

Restart Neovim and the error message will disappear. You will be able to use autocompletion again.

References#