You are not logged in.
Pages: 1
Hi,
I installed python-language-server package and configured my vim to use lsp in order to autocomplete for python. but it's not working on my arch linux machine while the exact same config in other machine with another OS is working correctly.
when I run pyls command I'll get this output:
➜ ~ pyls
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master
ws.require(__requires__)
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 900, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 791, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (jedi 0.13.3 (/usr/lib/python3.7/site-packages), Requirement.parse('jedi<0.15,>=0.14.1'), {'python-language-server'})
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/pyls", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3250, in <module>
@_call_aside
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3234, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3263, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 585, in _build_master
return cls._build_from_requirements(__requires__)
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 598, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 786, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'jedi<0.15,>=0.14.1' distribution was not found and is required by python-language-server
It seems there's a problem with jedi version which is the latest version in Arch official repos. I tried to install jedi 0.15 by pip but after installation there's still same error!
what should I do??
Last edited by mehran (2019-09-06 16:44:52)
Offline
Have you been using pip to install things system-wide perhaps?
If you must use pip, use a virtual environment, or pip install --user to avoid conflicts with packages in /usr. It is always preferred to use pacman to install software.
Offline
no. I always use --user or venv to install things with pip.
Offline
Hi, I can confirm I have the same problem, and I never messed with system-wide pip packages AFAIK.
The currently packaged version of pyls indeed requires jedi>=0.14.1 (code), while arch's jedi package is stuck at 0.13.3.
I'm not sure what's the common etiquette for informing the maintainer(s) though. Should I just email them or something?
P/s:
I tried to install jedi 0.15 by pip but after installation there's still same error!
That's because the exact constraint is jedi<0.15,>=0.14.1 which does not include 0.15. Something like `pip install --user jedi==0.14.1` should work.
Last edited by nhanb (2019-09-12 04:12:29)
Offline
Pages: 1