I'm getting this error, which doesn't make sense because the libraries are installed, and the correct python interpreter path is selected. I have no clue where the issue could be.
2 Answers
You can get the used Python path from :CocCommand workspace.showOutput Pyright, looks like Pyright was using the wrong Python.
3 Comments
fannheyward
Two ways: 1. activate the Python env before you open vim, or 2. set
python.pythonPath in your coc-settings.jsonnullromo
I have the same issue. Code runs fine, but I'm seeing the same Pyright errors in vim.
which python shows the same path as workspace.showOutput Pyright (they both show /usr/bin/python).nullromo
Update: I tried adding
"python.pythonPath: "/usr/bin/python" to my CocConfig and the errors are gone now. Seems weird because workspace.showOutput was already reporting the right path.