Skip to content
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

Cannot pip install orjson (python 3.6). #140

Closed
loomcode opened this issue Nov 2, 2020 · 13 comments
Closed

Cannot pip install orjson (python 3.6). #140

loomcode opened this issue Nov 2, 2020 · 13 comments

Comments

@loomcode
Copy link

loomcode commented Nov 2, 2020

sudo pip3 install --upgrade orjson:

Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/usr/lib/python3.6/tokenize.py", line 452, in open
        buffer = _builtin_open(filename, 'rb')
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-build-3dwbn4b3/orjson/setup.py'

Not sure why it can't find setup when it was just downloaded. I've verified that it exists in the source.

@loomcode loomcode changed the title Cannot pip install orjson. Cannot pip install orjson (python 3.6). Nov 2, 2020
@neepoo
Copy link

neepoo commented Nov 5, 2020

I've got the same problem.

@neepoo
Copy link

neepoo commented Nov 5, 2020

I've got the same problem.

Version 3.4.0 cannot be installed, version 3.3.0 can be installed.

@alexprengere
Copy link

You probably have an old pip. Try upgrading pip first:

python -m pip install --upgrade pip

I had the same issue with pip version 18, latest version fixes the issue.

@ijl
Copy link
Owner

ijl commented Nov 6, 2020

I have maybe made this obvious in https://github.com/ijl/orjson#install now.

@ijl ijl closed this as completed Nov 6, 2020
@loomcode
Copy link
Author

loomcode commented Nov 6, 2020

You probably have an old pip. Try upgrading pip first:

python -m pip install --upgrade pip

This worked for me.

@ludaavics
Copy link

@ijl

I can install manually via pip, but project requirements (and readme) state python >=3.7 which prevent adding orjson in dependency management tools like Poetry.
Any chance to lower those to 3.6?

Thanks!

@ludaavics
Copy link

nvm i see you just dropped 3.6 support, i'll just pin to previous version.

@drewm1980
Copy link

Python 3.6 support was removed, and coincidentally, support for correct round-tripping of float -> json -> float were added in the same release 3.6.2.

Can anyone clarify if there is a known problem with orjson 3.6.2 on python3.6, or is it just a matter of building it myself without support?

@drewm1980
Copy link

Put another way, was there a non-trivial technical reason for dropping python 3.6 when you did?

@drewm1980
Copy link

Found it:
commit a116ddf
Author: ijl ijl@mailbox.org
Date: Sun Aug 15 17:33:55 2021 +0000

pyo3 ^0.14.2

python3.6 is dropped because it's nearly end of life and there
is now assertion error in pyo3::gil::prepare_freethreaded_python
in CI when running integration/thread.

@drewm1980
Copy link

The version with the float round-tripping that I want was introduced in:
2719fc7

@drewm1980
Copy link

So unfortunately for me, there was no commit for python 3.6 with correct round-tripping of floating point numbers.

@GabrielAbdul
Copy link

You probably have an old pip. Try upgrading pip first:

python -m pip install --upgrade pip

I had the same issue with pip version 18, latest version fixes the issue.

This worked for me

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

No branches or pull requests

7 participants