Hallo. In Homebrew können einige Python-Module installiert werden, daher habe ich Homebrew nach Modulnamen durchsucht.
$ 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