I have a file that I suspect was installed by pip
.
How can I find which package installed that file?
In other words, I'm looking for a command similar to pacman -Qo filename
or dpkg -S filename
, but for pip
. Does it exist? Or should I use some combination of pip
and grep
?
In that case, I don't know how to list all the file installed.
Try this!
Note that if you add
-q
to thegrep
, it will exit as soon as there's a match, and then pip will complain about broken pipes.You could try with
Then search through the results looking for that file.
You can use a python script like this:
Usage looks like this:
I wrote a more complete version here, with absolute paths:
https://github.com/nbeaver/pip_file_lookup