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
Try this!
find_pkg_by_filename(){ for pkg in $(pip list | cut -d" " -f1) ; do if pip show -f "$pkg" | grep "$1" ; then echo "=== Above files found in package $pkg ===" ; fi ; done ; }
find_pkg_by_filename somefilename
Note that if you add -q to the grep, it will exit as soon as there's a match, and then pip will complain about broken pipes.