-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Installing jq onto Windows #20
Comments
I'm afraid I don't have much experience with Python on Windows, and none with installing C extensions on Windows, so can't offer any useful advice. |
Thanks for fast turn around. Let me ask around various folks. If I get an answer I'll post it back here. |
someone's hiring to solve this: https://www.upwork.com/jobs/~0147f3bb893b8bb615 |
http://www.dowdandassociates.com/blog/content/howto-install-jq/ |
I installed jq on windows using following method. |
Any news on this ? I tried to dig into this issue and it seems that oniguruma 6.8.2 can compile on windows (with make_win64.bat & visual cpp) but jq seems to compile only with mingw so I guess this will be an issue. Maybe compile all with mingw is the best choice here ? |
A wheel for Windows would be wonderful. It's a bit warful to wequire a workaround. |
I've installed jq by downloading the jq binary from the jq website, and put it somewhere in the windows PATH. This works, as I can use jq in any terminal now. However, if I try to do |
How to install in windows when working with python, pip install jq is giving errors still couldn't solve it :( |
ERROR: Failed building wheel for jq |
Ugh. I really don't want to remove jq as a dependency, it's really nice to let users just pass jq strings in to express "where is the thing", but I'm not about to go tell my new users that they have to use a different OS, nor do I want to add an external dependency and engage in |
I have built some wheels using mingw/msys against both python 3.10 and 3.11 here: https://www.cs.unm.edu/~jeffk/jq/ These have had very little testing, so please use at your own risk. To get jq.py to build I had to apply a number of hacks against the jq and jq.py source code. While I could probably go back and turn these into patches by guarding the changes with "if windows then XXX" sorts of conditions, perhaps more problematic was that in the process of building these I also came across a number of issues with python itself [1, 2], which ultimately led me to discover that mingw/msys is not supported by python [3]. While I was in turn able to work around these issues with additional hacks, the existence of these issues with python itself would seem to disfavor mingw/msys ever being an official build target of jq.py, although it clearly is not impossible to build jq.py using mingw/msys with enough effort. [1] https://bugs.python.org/issue28267 |
Thank you so much for that, you rock (at my own risk is much better than not at all) |
@jknockel , can you please share building instructions for windows or maybe build jq for python 3.12? |
Sure. In fact, I don't know if it's due to changes in python 3.12 or due to improvements to mingw64 (edit: it appears to be due to improvements in python 3.12), but the number of changes I had to make were much fewer this time: https://github.com/jknockel/jq.py/tree/mingw-build To build the wheel from an msys bash shell:
I've also uploaded the 3.12 wheel here: https://www.cs.unm.edu/~jeffk/jq/ Again, this build has had very little testing, so please use at your own risk. |
@jknockel , thanks. You really helped me to solve it with 3.11 and 3.12. |
@jknockel Sorry to bother after so long. ERROR: jq-1.7.0-cp311-cp311-mingw_x86_64_ucrt.whl is not a supported wheel on this platform. I suppose renaming it is not a proper solution. Please tell me if I've missed something, thanks! edit: Nevermind, I found the solution here: # ./_virtualenv/bin/pip install wheel
./_virtualenv/bin/wheel.exe unpack dist/jq-1.7.0-cp311-cp311-mingw_x86_64_ucrt.whl -d dist
mv dist/jq-1.7.0/jq.cp311-mingw_x86_64_ucrt.pyd dist/jq-1.7.0/jq.cp311-win_amd64.pyd
perl -i -pe 's/cp311-cp311-mingw_x86_64_ucrt/cp311-cp311-win_amd64/' dist/jq-1.7.0/jq-1.7.0.dist-info/WHEEL
./_virtualenv/bin/wheel.exe pack dist/jq-1.7.0 -d dist |
Looks like you may have already found a solution, but to clarify a few details that may be relevant, in my procedure I used the MSVCRT version of mingw not the UCRT version, and I used python as provided by the standard python installer on python.org, not an msys-packaged version of python. |
Thanks! Actually I turned to standard python shortly after that as well. These days I'm trying to turn the whole process into github action flows, possibly opening a PR once everything's working fine. |
I've just published 1.8.0a2, which includes Windows wheels. Reports of success or failure using those wheels are gratefully received! |
I just installed on Windows 11 successfully. I also ran a script with all of the asserts from the README and they all passed. |
Windows 10 x64 Python 3.12 - still installation error. |
Just to check: you're trying to install the prerelease version? If so, could you post what the error you're getting? |
sry, prerelease is installed successfully |
Thanks for the reports, 1.8.0 is now out with Windows wheels. Thanks again to all who helped put this together! |
The library looks great. I'm doing development in Python on windows. And not sure how to install this on Windows as a python library. I took at the setting up on the Linux side. And didn't figure out how to deploy this to Windows. Any links to help? Thanks
The text was updated successfully, but these errors were encountered: