#!/bin/sh python3 - <<'PY' for x in["sympy","numpy","scipy"]: try: m=__import__(x);print(x,m.__version__) except Exception as e:print(x,"no") PY