解决升级archlinux后neovim报错

2023年05月05日星期五阴北京市北京师范大学

在宿舍执行sudo pacman -Syu,使用neovim编辑了一篇日记,但是发现插入字符时一操作就会报错,出现如下提示

nvim报错
1
2
3
4
5
6
7
8
9
10
11
12
13
## Python 3 provider (optional) 
30 - WARNING: No Python executable found that can `import neovim`. Using the first available executable for diagnostics.
31 - ERROR: Python provider error:
32 - ADVICE:
33 - provider/pythonx: Could not load Python 3:
34 python3 not found in search path or not executable.
35 python3.7 not found in search path or not executable.
36 python3.6 not found in search path or not executable.
37 python3.5 not found in search path or not executable.
38 python3.4 not found in search path or not executable.
39 python3.3 not found in search path or not executable.
40 python not found in search path or not executable.
41 - INFO: Executable: Not found

解决方法为:为neovim添加python支持

添加python支持
1
python3 -m pip install --user --upgrade pynvim

注意:不要使用sudo执行,虽然我执行成功了,但是后面提示有可能有影响什么权限的问题。所以使用普通权限又安装了一遍。