try:
    import numpy
except ImportError:
    print('has_numpy = False')
else:
    print('has_numpy = True')
How to tell Condor to dispatch jobs only to machines on the cluster, that have "numpy" installed on them?