neoclide / coc-python

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

coc-python not working ModuleNotFoundError #193

Closed uninhm closed 4 years ago

uninhm commented 4 years ago

I've installed coc-python and when I out any character it shows the following error:

[coc.nvim] error:     at Pipe.onread (net.js:628:25)
source jedi timeout after 5000ms
[coc.nvim] Jedi error:     import jedi
ModuleNotFoundError: No module named 'jedi'

But I have installed jedi too

uninhm commented 4 years ago

It was a coc-settings.json error

stuckinforloop commented 4 years ago

It was a coc-settings.json error

What was the solution because I'm facing similar error

meinzer1899 commented 4 years ago

I would also appreciate a solution here. @neel229 Did you solve the problem already?

uninhm commented 4 years ago

I would also appreciate a solution here.

Add "python.pythonPath": "python3" to your coc-settings.json file

meinzer1899 commented 4 years ago

Thanks @unihernandez22. I want the language server to find the interpreter automatically.

I found a solution in this post https://github.com/palantir/python-language-server/issues/543. By deactivating jedi in the CocConfig, coc automatically installs and uses MS Python Language

For people who want to use Jedi, you have to set it's path accordingly. See this solution https://github.com/neoclide/coc-python/issues/40

redocmath commented 3 years ago

@unihernandez22 Wow! I'm very happy. I gave up vim almost because of this problem.

Very thank you, and thank you 👍