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.
Asked
Active
Viewed 5,005 times
1 Answers
2
You can get the used Python path from :CocCommand workspace.showOutput Pyright
, looks like Pyright was using the wrong Python.

fannheyward
- 18,599
- 12
- 71
- 109
-
5Two ways: 1. activate the Python env before you open vim, or 2. set `python.pythonPath` in your coc-settings.json – fannheyward Aug 02 '21 at 00:59
-
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 Jan 14 '22 at 19:54
-
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. – nullromo Jan 14 '22 at 19:57