I have installed coc.nvim and extension coc-python(:CocInstall coc-python)
When I opened file I refused of linting and then get error:
[coc.nvim] Jedi error: Traceback (most recent call last): File "completion.py", line 694, in <module>
[coc.nvim] Jedi error: Traceback (most recent call last):
[coc.nvim] Jedi error: import jedi
ModuleNotFoundError: No module named 'jedi'
I tried to reinstall extension and plugin but It doesn't help.
It's recommended to use https://github.com/fannheyward/coc-pyright if you're using Python 3, or use https://github.com/pappasam/coc-jedi if you're using Jedi.
Looks like you don't have the jedi
package installed for your python interpreter. I would expect it to work after you run (in your command line)
pip3 install jedi
I have also just seen that I installed the pynvim
package in my python environment as well but I don't remember whether you need this.
When I started to edit .py file there were some notification but cause I was typing the notification was skipped and then it showed me [coc.nvim] Jedi error: import Jedi
.
It turns out the notification asked me to select a python interpreter (I had two interpreters: one from anaconda and second from python.org). While I installed Jedi to 'python.org' interpreter, I didn't install Jedi to anaconda's python interpreter and hadn't selected which python interpreter to use.
So you should do either:
:CocCommand python.setInterpreter "C:\Users\username\AppData\Local\Programs\Python\PythonVersion\python.EXE"
or:CocCommand python.setInterpreter "/usr/bin/python3"
And don't forget actually install Jedi: pip install jedi
YMMV but I got past that exact error by adding this to my :CocConfig "python.jediEnabled": false
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With