Skip to content

Pip install fails with ujson error #857

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
zerocewl opened this issue Sep 9, 2020 · 9 comments · Fixed by #842
Closed

Pip install fails with ujson error #857

zerocewl opened this issue Sep 9, 2020 · 9 comments · Fixed by #842
Milestone

Comments

@zerocewl
Copy link
Contributor

zerocewl commented Sep 9, 2020

Default pip installation fails with error for wrong ujson version.

pip install python-language-server

Error:

python-jsonrpc-server 0.4.0 requires ujson>=3.0.0, but you'll have ujson 1.35 which is incompatible.

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

pip install python-jsonrpc-server<0.4
pip install python-language-server

Possible solutions:

  • pin python_jsonrpc_server to v <0.4
  • update ujson too

Maybe blocked by #808

Quick and easy fix by #859

@zerocewl zerocewl changed the title Pip install fails with ujosn error Pip install fails with ujson error Sep 9, 2020
@cuizaiyong
Copy link

When I use pip install python-language-server[all], the same problem occurred.

@izumism
Copy link

izumism commented Sep 10, 2020

Following command resolve this problem in my case.
pip install python-language-server[all] --use-feature=2020-resolver

@aplanas
Copy link

aplanas commented Sep 10, 2020

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.

@ccordoba12
Copy link
Contributor

This will be fixed when PR #842 is merged and a new version is released.

@GNSubrahmanyam

This comment has been minimized.

@aplanas
Copy link

aplanas commented Sep 10, 2020

@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

@GNSubrahmanyam

This comment has been minimized.

@izumism
Copy link

izumism commented Sep 10, 2020

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.

@ghost
Copy link

ghost commented Sep 11, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants