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

Unable to install Django-unicorn due to orjson on windows #105

Closed
casper1403 opened this issue Dec 30, 2020 · 5 comments
Closed

Unable to install Django-unicorn due to orjson on windows #105

casper1403 opened this issue Dec 30, 2020 · 5 comments
Assignees

Comments

@casper1403
Copy link

casper1403 commented Dec 30, 2020

Hi, I tried to install django-unicorn with pip but was unable to do so because of its dependency on orjson.

ERROR: Command errored out with exit status 1:
 command: 'c:\users\user\appdata\local\programs\python\python37-32\python.exe' 'c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\user\AppData\Local\Temp\tmp44sdrpnu'
     cwd: C:\Users\user\AppData\Local\Temp\pip-install-ykiwhtsu\orjson_635ea463d23b456bb448742a00ed7258
Complete output (6 lines):

Cargo, the Rust package manager, is not installed or is not on PATH.
This package requires Rust and Cargo to compile extensions. Install it through
the system's package manager or via https://rustup.rs/

Checking for Rust toolchain....

I tried to install Rust and Cargo but this failed as it was not compatible with my 32-bit python interpreter. I succeeded my install by using an anaconda environment and first using "conda install -c conda-forge orjson" , "conda install pip" and then "pip install django-unicorn". You might want to look into this as it took me a couple of hours to work around this error.

**I tried poetry as well which gave the same error

@adamghill
Copy link
Owner

I'm sorry you ran into those issues. I'm investigating the issues on the orison GitHub repo to understand what support it has on Windows, but maybe the best thing would be if I created some documentation around installation problems so it is at least documented?

Another approach would be to move away from orjson to a pure-Python JSON parser, but that would require a non-trivial amount of work. :(

@adamghill adamghill self-assigned this Dec 31, 2020
@adamghill
Copy link
Owner

Reading through ijl/orjson#19 and seeing c:\users\user\appdata\local\programs\python\python37-32\python.exe I'm guessing it was a 32-bit install of Python on your Windows machine? I can make a note of the lack of support for 32-bit Windows because of the orison dependency in the documentation.

@casper1403
Copy link
Author

Good point. I will try to change my kernel to 64 bit and update you on any changes

@casper1403
Copy link
Author

Yess so I changed my Python installation to the 64 bit version and was able to install django-unicorn without any problems! Just adding this to the installation page in the docs would be sufficient.

adamghill added a commit to adamghill/django-unicorn.com that referenced this issue Jan 1, 2021
@adamghill
Copy link
Owner

That's awesome, I'm glad it was relatively straight-forward to get it installed. I made a note in the docs and am deploying them now.

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

2 participants