14

I am trying to install JQ via PIP in python.

pip install jq

I am getting following error.

Failed building wheel for jq

enter image description here

I am facing same issue while install pyjq.

pip install pyjq

Failed building wheel for pyjq

enter image description here

devanathan
  • 768
  • 3
  • 10
  • 39

4 Answers4

6

On Ubuntu 18.04, I needed to apt-get install autoconf libtool before my pip install pyjq would complete.

Tosser1872
  • 69
  • 1
  • 2
  • 1
    This worked for me, but @devanthan is using Windows. The project homepage on PyPI (https://pypi.org/project/jq/) currently shows how to install the dependencies only on Linux and OS X. – andrew lorien Nov 30 '19 at 23:29
5

It doesn't appear that jq supports Windows; it says it requires gcc & libtool, which generally means a Unix-like environment.

cco
  • 5,873
  • 1
  • 16
  • 21
1

Like you I had a difficult time installing jq

In my attempts I had many various errors including the failed building wheel that you are getting. I assume that the problem was on my end and not that the host was temporarily down. My setup: python 2 & 3, Jupyter, brew in addition to pip. The problem was likely due to some lack of consistency in package links, brew doctor helped me identify which links were broken then brew link/unlink/overwrite.

At anyrate I was only successful after brew uninstall jq, fixing all links, then updating brew and rebooting my system (perhaps some dependency was occupied?).

Then and only then did finally pip install jq work

Antoine
  • 33
  • 6
  • 1
    "brew doctor" had a lot of complaints for me, and I fixed them. (Thanks! Didn't know "brew doctor" existed.) Now, although I can "brew install jq", but not "pip install pyjq" or "pipenv install" will a requirements file listing pyjq... – Sarah Messer Mar 28 '18 at 17:36
1

I have experienced same issues as OP. Although in my case (Debian Stretch 9.5) it turned out dh-autoreconf package was missing. After installing it, jq build finished successfully.