Closed zerocewl closed 3 years ago
When I use pip install python-language-server[all]
, the same problem occurred.
Following command resolve this problem in my case.
pip install python-language-server[all] --use-feature=2020-resolver
Following command resolve this problem in my case.
pip install python-language-server[all] --use-feature=2020-resolver
Uhm this should fail when the server start, as one component (pyls or the jsonrpc-server) will complain that the incorrect version of ujson is installed.
This will be fixed when PR #842 is merged and a new version is released.
@ccordoba12 vendors~lsp-client.js:2 Uncaught (in promise) Error: pkg_resources.ContextualVersionConflict: (ujson 1.35 (/usr/local/lib/python3.6/dist-packages), Requirement.parse('ujson>=3.0.0'), {'python-jsonrpc-server'}) I am also getting this
@GNSubrahmanyam this is the current bug, that ujson 1.35 is installed by requirements of pyls, but jsonrpc-server requires >=3.0. The patch from #842 fix this issue, installing ujson >=3.0 in pyls if Python 3 is used. We need to wait for the new release, or manually edit the METADATA in site-packages to fix the current mismatch
@aplanas I am using python-language-server[all]==0.31.10 with monaco editor why because in latest version of python-language-server linters are not working.
\vendors~lsp-client.js:2 Uncaught (in promise) Error: pkg_resources.ContextualVersionConflict: (ujson 1.35 (/usr/local/lib/python3.6/dist-packages), Requirement.parse('ujson>=3.0.0'), {'python-jsonrpc-server'}) error i am not getting in docker container. I am getting only in ec2 instances
I use pip>=20.2 and It includes new feature of dependency resolver, but it is not included by default. The command --use-feature=2020-resolver
enable this functionality as this announcement says.
Upgrading to python-language-server version 0.35.0 (https://github.com/palantir/python-language-server/releases/tag/0.35.0) solved the issue for us
Default pip installation fails with error for wrong
ujson
version.pip install python-language-server
Error:
Since the dependency lib
python-jsonrpc-server
was updated to v0.4 the updated ujson version leads to an incompatible installation with current settings ujson 1.35 in pyls.Latest version of python-jsonrpc-server: https://pypi.org/project/python-jsonrpc-server/ Depending pr: https://github.com/palantir/python-jsonrpc-server/pull/44/files
Workaround: use
python_jsonrpc_server<0.4
Possible solutions:
ujson
tooMaybe blocked by https://github.com/palantir/python-language-server/pull/808
Quick and easy fix by https://github.com/palantir/python-language-server/pull/859