ayamir / nvimdots

A well configured and structured Neovim.
BSD 3-Clause "New" or "Revised" License
2.95k stars 458 forks source link

Installation failed for Package(name=clang-format) error="Failed to create python3 virtual environment." when I open nvim #914

Closed Uzhia closed 1 year ago

Uzhia commented 1 year ago

Version confirmation

Following prerequisites

Neovim version

NVIM v0.9.1 Build type: Release LuaJIT 2.1.0-beta3

Operating system/version

Ubuntu 22.04.2 LTS

Terminal name/version

kitty 0.21.2 created by Kovid Goyal

$TERM environment variable

xterm-kitty

Branch info

main (Default/Latest)

Fetch Preferences

HTTPS (use_ssh = false)

How to reproduce the issue

  1. nvim

Expected behavior

No error

Actual behavior

[INFO  2023年07月31日 星期一 10时29分20秒] ...m/site/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=clang-format) {}
[INFO  2023年07月31日 星期一 10时29分20秒] ...m/site/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=prettier) {}
[INFO  2023年07月31日 星期一 10时29分20秒] ...m/site/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=vint) {}
[ERROR 2023年07月31日 星期一 10时29分20秒] ...m/site/lazy/mason.nvim/lua/mason-core/installer/init.lua:249: Installation failed for Package(name=clang-format) error="Failed to create python3 virtual environment."
[ERROR 2023年07月31日 星期一 10时29分20秒] ...m/site/lazy/mason.nvim/lua/mason-core/installer/init.lua:249: Installation failed for Package(name=vint) error="Failed to create python3 virtual environment."
[ERROR 2023年07月31日 星期一 10时29分21秒] ...m/site/lazy/mason.nvim/lua/mason-core/installer/init.lua:249: Installation failed for Package(name=prettier) error=spawn: npm failed with exit code 1 and signal 0. 
[INFO  2023年07月31日 星期一 10时29分26秒] ...m/site/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=bash-language-server) {}
[INFO  2023年07月31日 星期一 10时29分26秒] ...m/site/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=html-lsp) {}
[INFO  2023年07月31日 星期一 10时29分26秒] ...m/site/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=json-lsp) {}
[INFO  2023年07月31日 星期一 10时29分26秒] ...m/site/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=python-lsp-server) {}
[ERROR 2023年07月31日 星期一 10时29分26秒] ...m/site/lazy/mason.nvim/lua/mason-core/installer/init.lua:249: Installation failed for Package(name=python-lsp-server) error="Failed to create python3 virtual environment."
[ERROR 2023年07月31日 星期一 10时29分27秒] ...m/site/lazy/mason.nvim/lua/mason-core/installer/init.lua:249: Installation failed for Package(name=bash-language-server) error=spawn: npm failed with exit code 1 and signal 0. 
[ERROR 2023年07月31日 星期一 10时29分27秒] ...m/site/lazy/mason.nvim/lua/mason-core/installer/init.lua:249: Installation failed for Package(name=html-lsp) error=spawn: npm failed with exit code 1 and signal 0. 
[ERROR 2023年07月31日 星期一 10时29分27秒] ...m/site/lazy/mason.nvim/lua/mason-core/installer/init.lua:249: Installation failed for Package(name=json-lsp) error=spawn: npm failed with exit code 1 and signal 0. 

Additional information

This is :checkhealtp info


==============================================================================
hop: require("hop.health").check()

Ensuring keys are unique ~
- OK Keys are unique

Checking for deprecated features ~
- OK All good

==============================================================================
lazy: require("lazy.health").check()

lazy.nvim ~
- OK Git installed
- OK no existing packages found by other package managers
- OK packer_compiled.lua not found

==============================================================================
lspsaga: require("lspsaga.health").check()

Lspsaga.nvim report ~
- WARNING `tree-sitter` executable not found 
- OK tree-sitter `markdown` parser found
- OK tree-sitter `markdown_inline` parser found

==============================================================================
mason: require("mason.health").check()

- ERROR Failed to run healthcheck for "mason" plugin. Exception:
  function health#check, line 25
  Vim(eval):E5108: Error executing lua ...cal/share/nvim/site/lazy/mason.nvim/lua/mason/health.lua:329: function health#check[25]..health#report_error[2]..<SNR>124_format_report_message, line 7: a:1: expected String or List
  stack traceback:
  [C]: in function 'error'
  .../nvim/site/lazy/mason.nvim/lua/mason-core/async/init.lua:131: in function 'run_blocking'
  ...cal/share/nvim/site/lazy/mason.nvim/lua/mason/health.lua:329: in function 'check'
  [string "luaeval()"]:1: in main chunk

==============================================================================
null-ls: require("null-ls.health").check()

- ERROR clang_format: the command "clang-format" is not executable.
- ERROR prettier: the command "prettier" is not executable.
- OK rustfmt: the command "rustfmt" is executable.
- OK shfmt: the command "shfmt" is executable.
- OK stylua: the command "stylua" is executable.

==============================================================================
nvim: require("nvim.health").check()

Configuration ~
- OK no issues found

Runtime ~
- OK $VIMRUNTIME: /usr/share/nvim/runtime

Performance ~
- OK Build type: Release

Remote Plugins ~
- WARNING "wilder.nvim" is not registered.
- WARNING Out of date
  - ADVICE:
    - Run `:UpdateRemotePlugins`

terminal ~
- key_backspace (kbs) terminfo entry: `key_backspace=\177`
- key_dc (kdch1) terminfo entry: `key_dc=\E[3~`
- $COLORTERM="truecolor"

==============================================================================
nvim-treesitter: require("nvim-treesitter.health").check()

Installation ~
- WARNING `tree-sitter` executable not found (parser generator, only needed for :TSInstallFromGrammar, not required for :TSInstall)
- OK `node` found v18.17.0 (only needed for :TSInstallFromGrammar)
- OK `git` executable found.
- OK `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
  Version: cc (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0
- OK Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.

OS Info:
{
  machine = "x86_64",
  release = "5.19.0-46-generic",
  sysname = "Linux",
  version = "#47~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Jun 21 15:35:31 UTC 2"
} ~

Parser/Features         H L F I J
  - bash                ✓ ✓ ✓ . ✓
  - c                   ✓ ✓ ✓ ✓ ✓
  - cpp                 ✓ ✓ ✓ ✓ ✓
  - css                 ✓ . ✓ ✓ ✓
  - go                  ✓ ✓ ✓ ✓ ✓
  - gomod               ✓ . . . ✓
  - html                ✓ ✓ ✓ ✓ ✓
  - javascript          ✓ ✓ ✓ ✓ ✓
  - json                ✓ ✓ ✓ ✓ .
  - latex               ✓ . ✓ . ✓
  - lua                 ✓ ✓ ✓ ✓ ✓
  - make                ✓ . ✓ . ✓
  - markdown            ✓ . ✓ ✓ ✓
  - markdown_inline     ✓ . . . ✓
  - python              ✓ ✓ ✓ ✓ ✓
  - query               ✓ ✓ ✓ ✓ ✓
  - rust                ✓ ✓ ✓ ✓ ✓
  - typescript          ✓ ✓ ✓ ✓ ✓
  - vim                 ✓ ✓ ✓ . ✓
  - vimdoc              ✓ . . . ✓
  - vue                 ✓ . ✓ ✓ ✓
  - yaml                ✓ ✓ ✓ ✓ ✓

  Legend: H[ighlight], L[ocals], F[olds], I[ndents], In[j]ections
         +) multiple parsers found, only one will be used
         x) errors found in the query, try to run :TSUpdate {lang} ~

==============================================================================
provider: health#provider#check

Clipboard (optional) ~
- OK Clipboard tool found: xclip

Python 3 provider (optional) ~
- Using: g:python3_host_prog = "python3"
- Executable: /usr/bin/python3
- Python version: 3.10.6
- pynvim version: 0.4.2 (outdated; from /usr/lib/python3/dist-packages/neovim)
- WARNING Latest pynvim is NOT installed: 0.4.3

Python virtualenv ~
- OK no $VIRTUAL_ENV

Ruby provider (optional) ~
- Ruby: ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux-gnu]
- WARNING `neovim-ruby-host` not found.
  - ADVICE:
    - Run `gem install neovim` to ensure the neovim RubyGem is installed.
    - Run `gem environment` to ensure the gem bin directory is in $PATH.
    - If you are using rvm/rbenv/chruby, try "rehashing".
    - See :help |g:ruby_host_prog| for non-standard gem installations.
    - You may disable this provider (and warning) by adding `let g:loaded_ruby_provider = 0` to your init.vim

Node.js provider (optional) ~
- Node.js: v18.17.0
- WARNING Missing "neovim" npm (or yarn, pnpm) package.
  - ADVICE:
    - Run in shell: npm install -g neovim
    - Run in shell (if you use yarn): yarn global add neovim
    - Run in shell (if you use pnpm): pnpm install -g neovim
    - You may disable this provider (and warning) by adding `let g:loaded_node_provider = 0` to your init.vim

Perl provider (optional) ~
- WARNING "Neovim::Ext" cpan module is not installed
  - ADVICE:
    - See :help |provider-perl| for more information.
    - You may disable this provider (and warning) by adding `let g:loaded_perl_provider = 0` to your init.vim

==============================================================================
rainbow-delimiters: require("rainbow-delimiters.health").check()

- ERROR Failed to run healthcheck for "rainbow-delimiters" plugin. Exception:
  function health#check, line 25
  Vim(eval):E5108: Error executing lua /usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid structure at position 1065 for language javascript
  stack traceback:
  [C]: in function '_ts_parse_query'
  /usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: in function 'get'
  ...ainbow-delimiters.nvim/lua/rainbow-delimiters/health.lua:47: in function 'check_query'
  ...ainbow-delimiters.nvim/lua/rainbow-delimiters/health.lua:111: in function 'check'
  [string "luaeval()"]:1: in main chunk

==============================================================================
vim.lsp: require("vim.lsp.health").check()

- LSP log level : WARN
- Log path: /home/fwq/.local/state/nvim/lsp.log
- Log size: 118 KB

vim.lsp: Active Clients ~
- copilot (id=1, root_dir=/home/fwq/code/cpp/cf/contest/1/a)

==============================================================================
vim.treesitter: require("vim.treesitter.health").check()

- Nvim runtime ABI version: 14
- OK Parser: bash       ABI: 14, path: /home/fwq/.local/share/nvim/site/lazy/nvim-treesitter/parser/bash.so
- OK Parser: c          ABI: 14, path: /home/fwq/.local/share/nvim/site/lazy/nvim-treesitter/parser/c.so
- OK Parser: cpp        ABI: 14, path: /home/fwq/.local/share/nvim/site/lazy/nvim-treesitter/parser/cpp.so
- OK Parser: css        ABI: 13, path: /home/fwq/.local/share/nvim/site/lazy/nvim-treesitter/parser/css.so
- OK Parser: go         ABI: 14, path: /home/fwq/.local/share/nvim/site/lazy/nvim-treesitter/parser/go.so
- OK Parser: gomod      ABI: 13, path: /home/fwq/.local/share/nvim/site/lazy/nvim-treesitter/parser/gomod.so
- OK Parser: html       ABI: 14, path: /home/fwq/.local/share/nvim/site/lazy/nvim-treesitter/parser/html.so
- OK Parser: javascript ABI: 14, path: /home/fwq/.local/share/nvim/site/lazy/nvim-treesitter/parser/javascript.so
- OK Parser: json       ABI: 14, path: /home/fwq/.local/share/nvim/site/lazy/nvim-treesitter/parser/json.so
- OK Parser: latex      ABI: 14, path: /home/fwq/.local/share/nvim/site/lazy/nvim-treesitter/parser/latex.so
- OK Parser: lua        ABI: 14, path: /home/fwq/.local/share/nvim/site/lazy/nvim-treesitter/parser/lua.so
- OK Parser: make       ABI: 13, path: /home/fwq/.local/share/nvim/site/lazy/nvim-treesitter/parser/make.so
- OK Parser: markdown   ABI: 14, path: /home/fwq/.local/share/nvim/site/lazy/nvim-treesitter/parser/markdown.so
- OK Parser: markdown_inline ABI: 14, path: /home/fwq/.local/share/nvim/site/lazy/nvim-treesitter/parser/markdown_inline.so
- OK Parser: python     ABI: 14, path: /home/fwq/.local/share/nvim/site/lazy/nvim-treesitter/parser/python.so
- OK Parser: rust       ABI: 14, path: /home/fwq/.local/share/nvim/site/lazy/nvim-treesitter/parser/rust.so
- OK Parser: typescript ABI: 14, path: /home/fwq/.local/share/nvim/site/lazy/nvim-treesitter/parser/typescript.so
- OK Parser: vimdoc     ABI: 14, path: /home/fwq/.local/share/nvim/site/lazy/nvim-treesitter/parser/vimdoc.so
- OK Parser: vue        ABI: 13, path: /home/fwq/.local/share/nvim/site/lazy/nvim-treesitter/parser/vue.so
- OK Parser: yaml       ABI: 13, path: /home/fwq/.local/share/nvim/site/lazy/nvim-treesitter/parser/yaml.so
- OK Parser: c          ABI: 14, path: /usr/lib/nvim/parser/c.so
- OK Parser: lua        ABI: 14, path: /usr/lib/nvim/parser/lua.so
- OK Parser: query      ABI: 14, path: /usr/lib/nvim/parser/query.so
- OK Parser: vim        ABI: 14, path: /usr/lib/nvim/parser/vim.so
- OK Parser: vimdoc     ABI: 14, path: /usr/lib/nvim/parser/vimdoc.so

==============================================================================
which-key: require("which-key.health").check()

WhichKey: checking conflicting keymaps ~
- WARNING conflicting keymap exists for mode **"v"**, lhs: **" c"**
- rhs: `<Cmd>HopChar1<CR>`
- WARNING conflicting keymap exists for mode **"n"**, lhs: **" c"**
- rhs: `<Cmd>HopChar1<CR>`
- WARNING conflicting keymap exists for mode **"n"**, lhs: **"gc"**
- rhs: `<Plug>(comment_toggle_linewise)`
- WARNING conflicting keymap exists for mode **"n"**, lhs: **"gb"**
- rhs: `<Plug>(comment_toggle_blockwise)`
- WARNING conflicting keymap exists for mode **"n"**, lhs: **"t"**
- rhs: `<Plug>(clever-f-t)`

And I installed g++,but not installed clang.

ayamir commented 1 year ago
  1. Remove the directory of mason.nvim and reinstall it.
  2. Execute :TSUpdate to update all of treesitter parsers to address the issue of rainbow-delmiters
Uzhia commented 1 year ago

Sorry, I don't understand.Where is the directory of mason.nvim and how to reinstall it? After I execute :TSUpdate, the nvim treesitter says All parsers are up -to-date!