I'm trying to see if a certain python-library is installed by grepping the output of pip list
. If I try this
pip list | grep -q $package
, it works fine. If I try pip list | grep -qi $package
, I get the following error output
pi@pibox:~ $ pip list | grep -i -q pyyaml
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
load_entry_point('pip==1.5.6', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 248, in main
return command.main(cmd_args)
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 156, in main
logger.fatal('Exception:\n%s' % format_exc())
File "/usr/lib/python2.7/dist-packages/pip/log.py", line 111, in fatal
self.log(self.FATAL, msg, *args, **kw)
File "/usr/lib/python2.7/dist-packages/pip/log.py", line 164, in log
consumer.flush()
IOError: [Errno 32] Broken pipe
this seems to be an error on the python side of things, what would the grepm flag to ignore case have to do with pip's ability to send information down a pipe?
This is on a Raspberry Pi 3 running pip 1.5.6 from /usr/lib/python2.7/dist-packages (python 2.7)
and grep (GNU grep) 2.20
.