`ModuleNotFoundError` exception doesn't exist in python2
If you are using python2 and you try to run a sampler that hasn't been installed, then you hit this line in base_sampler.py
https://git.ligo.org/lscsoft/bilby/blob/master/bilby/core/sampler/base_sampler.py#L148
where you try to catch a ModuleNotFoundError
, which is not defined in python2.
If the sampler is properly installed you never hit that exception line and never actually get this error.
-pat