Hello. Since homebrew can install some python modules, I searched homebrew by module name.
$ pip list --format=legacy --outdated | cut -d' ' -f 1 | ./pip_homebrew_search
.sh
numpy numpy ✔
GDAL osgeo/osgeo4mac/gdal2-python ✔
Pillow homebrew/science/pillow ✔
pip_homebrew_search.sh
#!/bin/sh
if [ $# == 0 ] && [ ! -p /dev/stdin ] ; then
declare -a pymodules=(numpy GDAL Pillow)
else
pymodules=(`cat "$@" | tr '\n' ' '`)
fi
brewModuleName () {
GDAL="gdal2-python"
eval mName=\$"${1}"
[[ -z "${mName}" ]] && mName=`echo "$1" | tr '[A-Z]' '[a-z]'`
echo "${mName}"
}
for e in "${pymodules[@]}"; do
/bin/echo -n "${e} "
brew search `brewModuleName $e`
done
exit $?
Recommended Posts