Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Request help w/pip install jq

1,968 views
Skip to first unread message

Ed Walser

unread,
Jul 19, 2020, 11:29:55 AM7/19/20
to
Hi all,

I've tried installing jq several times in my local environment, but it
fails, saying it can't find a file that pip downloads. Here is the entire
pip output:

(base) C:\Users\edwal>pip install jq

Collecting jq

Downloading jq-1.0.2.tar.gz (57 kB)

|████████████████████████████████| 57 kB 703 kB/s

Installing build dependencies ... done

Getting requirements to build wheel ... done

Preparing wheel metadata ... done

Building wheels for collected packages: jq

Building wheel for jq (PEP 517) ... error

ERROR: Command errored out with exit status 1:

command: 'C:\Users\edwal\anaconda3\envs\planet1\python.exe'
'C:\Users\edwal\anaconda3\envs\planet1\lib\site-packages\pip\_vendor\pep517\_in_process.py'
build_wheel 'C:\Users\edwal\AppData\Local\Temp\tmpd0skcxv2'

cwd: C:\Users\edwal\AppData\Local\Temp\pip-install-bwgrrs8c\jq

Complete output (7 lines):

running bdist_wheel

running build

running build_ext

Downloading
https://github.com/kkos/oniguruma/releases/download/v6.9.4/onig-6.9.4.tar.gz

Downloaded
https://github.com/kkos/oniguruma/releases/download/v6.9.4/onig-6.9.4.tar.gz

Executing: ./configure CFLAGS=-fPIC
--prefix=C:\Users\edwal\AppData\Local\Temp\pip-install-bwgrrs8c\jq\_deps\onig-install-6.9.4

error: [WinError 2] The system cannot find the file specified

----------------------------------------

ERROR: Failed building wheel for jq

Failed to build jq

ERROR: Could not build wheels for jq which use PEP 517 and cannot be
installed directly

--
Ed Walser
e...@WalserAnalyticsConsulting.com
571.364.9618

MRAB

unread,
Jul 19, 2020, 11:59:15 AM7/19/20
to
I notice a mention of Anaconda in the traceback. Are you using Anaconda
instead of the standard Python from python.org?

If so, try using "conda" instead of "pip".

Mats Wichmann

unread,
Jul 19, 2020, 12:39:29 PM7/19/20
to
On 7/19/20 8:46 AM, Ed Walser wrote:
> Hi all,
>
> I've tried installing jq several times in my local environment, but it
> fails, saying it can't find a file that pip downloads. Here is the entire
> pip output:
>
> (base) C:\Users\edwal>pip install jq

Don't install that way, do:

python -m pip install jq

or, since you seem to be on Windows, if you use the Python Launcher, do:

py -m pip install jq

That won't help your problem, though. Which is:

> Building wheels for collected packages: jq
>
> Building wheel for jq (PEP 517) ... error

pip tries to install a wheel first, if it didn't find a suitable one, it
gets the source package (generally called an sdist) and tried to build
it. This usually fails on Windows, because Windows doesn't come with
compilers by default, and even if installed, often goes awry anyway
because the setups never seem to match. If people want you to build for
Windows yourself, there will usually be a detailed description of how to
get it set up the right way.

That's the general story.

Now the bad news:

https://pypi.org/project/jq/#files

there are in fact no wheels for Windows here.

And on the main page

https://pypi.org/project/jq/

there is no mention of Windows at all, so the guess would be it's not
supported.

You might search if someone has gotten this working / packaged it for
Anaconda, since you seem to be using that. If so, you'll want to
install it with the conda command, not pip. See suitable instructions
within the Anaconda website.


MRAB

unread,
Jul 19, 2020, 1:35:14 PM7/19/20
to
This page mentions Windows:

https://stedolan.github.io/jq/download/

Mats Wichmann

unread,
Jul 19, 2020, 3:03:31 PM7/19/20
to
On 7/19/20 11:42 AM, Dennis Lee Bieber wrote:
> On Sun, 19 Jul 2020 10:39:09 -0600, Mats Wichmann <ma...@python.org>
> declaimed the following:
>
>> there is no mention of Windows at all, so the guess would be it's not
>> supported.
>>
> There is a whole open "issue" for that...
>
> https://github.com/mwilliamson/jq.py/issues/20
>
> and given that the last entry was two years ago, by someone asking if
> there'd been any progress... I wouldn't hold out much hope for a
> pre-packaged solution.
>
> I also have some problem believing that the install of a different
> package manager allowed an install/build, but it does show up on
> https://chocolatey.org/packages/jq and is a fairly recent version (last
> September).
>

choco is a fine and useful tool, I use it lots.

but I think what's there is the base jq package, not the Python bindings
which would presumably the topic of interest in a Python mailing list.


0 new messages