python-language-server
python-language-server copied to clipboard
ModuleNotFoundError: No module named 'jedi' while Jedi is installed
I'm having this problem where the system can't find Jedi, even though it's already installed. The import statement looks right, so it might be a problem with my python setup.
Here's the traceback, lemme know if you need more. Thanks!
[trey@Henry .emacs.d]$ pyls
Traceback (most recent call last):
File "/usr/bin/pyls", line 11, in <module>
load_entry_point('python-language-server==0.26.1', 'console_scripts', 'pyls')()
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2843, in load_entry_point
return ep.load()
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2434, in load
return self.resolve()
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2440, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python3.7/site-packages/pyls/__main__.py", line 7, in <module>
from .python_ls import start_io_lang_server, start_tcp_lang_server, PythonLanguageServer
File "/usr/lib/python3.7/site-packages/pyls/python_ls.py", line 12, in <module>
from .workspace import Workspace
File "/usr/lib/python3.7/site-packages/pyls/workspace.py", line 7, in <module>
import jedi
ModuleNotFoundError: No module named 'jedi'
[trey@Henry .emacs.d]$ sudo pip install jedi
[sudo] password for trey:
Requirement already satisfied: jedi in /usr/lib/python3.7/site-packages (0.13.2)
Requirement already satisfied: parso>=0.3.0 in /usr/lib/python3.7/site-packages (from jedi) (0.3.1)
[trey@Henry .emacs.d]$ pip install jedi
Requirement already satisfied: jedi in /usr/lib/python3.7/site-packages (0.13.2)
Requirement already satisfied: parso>=0.3.0 in /usr/lib/python3.7/site-packages (from jedi) (0.3.1)
python -m pip install jedi
I'm having this problem, too. Not sure how to get around it either. I have Jedi installed, and I can require jedi from a normal python program, but there seem to be problems importing it when I use it with CoC in vim.
I can also run pyls normally from the command line without any errors coming up.
@CengSin I just ran it, and here's what I got:
[trey@Henry ~]$ sudo python -m pip install jedi
[sudo] password for trey:
Requirement already satisfied: jedi in /usr/lib/python3.7/site-packages (0.13.2)
Requirement already satisfied: parso>=0.3.0 in /usr/lib/python3.7/site-packages (from jedi) (0.3.1)
Same here
I'm experiencing the same error with Python 3.8. Any solutions so far?
I'm experiencing the same error with Python 3.8. Any solutions so far?
Do you have two python version on your machine? Its possible that you installed jedi through python2, try python3 -m pip install jedi
I got a similar issue, and I solved it as follows:
- Read the README of coc-python.
- Open the coc configuration:
:CocConfig
- As it says on it, add
"python.jediEnabled": false
in the config file, save it and close it. - Open a file in your Python project (with nvim or vim) and automatically, will be downloaded and installed Python Language Server. After that, the auto-completion in a Python file works for me.
I got a similar issue, and I solved it as follows:
- Read the README of coc-python.
- Open the coc configuration:
:CocConfig
- As it says on it, add
"python.jediEnabled": false
in the config file, save it and close it.- Open a file in your Python project (with nvim or vim) and automatically, will be downloaded and installed Python Language Server. After that, the auto-completion in a Python file works for me.
Thanks alot