neoclide / coc-python

Python extension for coc.nvim, fork of vscode-python
574 stars 51 forks source link

[bug] always prompt linter is not installed #273

Open Freed-Wu opened 4 years ago

Freed-Wu commented 4 years ago

Reproduce Procedures

" FILE: $XDG_CONFIG_HOME/nvim/test.vim
" OS: linux v5.4.13
" VI: nvim v0.4.3
" TERM: guake v3.7.0
" coc-python: v1.2.12
set runtimepath=$VIMRUNTIME,$GITHUBWORKSPACE/neoclide/coc.nvim
" vi -u $XDG_CONFIG_HOME/nvim/test.vim /a/test/python/file.py

Screenshot from 2020-09-07 18-18-31

however, image

any linter (not only pylinter, but also pyflake, etc) will also prompt this error.

thanks!

nomasprime commented 4 years ago

Not sure how you've installed pylint and I'm not very familiar with Python's virtual environments but specifying the runtime path solved a similar issue for me:

{
  ...
  "python.linting.mypyPath": "~/.asdf/shims/mypy",
  ...
}
Freed-Wu commented 4 years ago

by default, the var of "python.linting.xxxpath" is "xxx". all of them are installed in /usr/bin which is one part of $PATH.

nomasprime commented 4 years ago

@Freed-Wu ~/.asdf/shims is part of my $PATH but I still had to specify for some reason. Not sure why coc-python couldn't find it.

Sounds like you can fix your issue by specifying the full path but ultimately coc-python should be able to find it, ie, bug or improvement.

Freed-Wu commented 4 years ago

@Freed-Wu ~/.asdf/shims is part of my $PATH but I still had to specify for some reason. Not sure why coc-python couldn't find it.

in my humble opinion, i still think it is a bug. coc-python should find it if ~/.asdf/shims is a part of your $PATH.

Fingalzzz commented 4 years ago

Same experience here. Linter works fine, but each time you open a file in vim it still prompt Linter is not installed.

Firestar-Reimu commented 3 years ago

I use anaconda and it too always says that pylint is not installed even conda list says that I have pylint