os.sched_getaffinity() is only available on some *nix platforms
https://gitlab.esrf.fr/tomotools/nabu/-/blob/master/nabu/utils.py#L69
A safer way to determine the actual number of real cores should be:
try:
# Get the real number of processor cores available
# os.sched_getaffinity is only available on some *nix platforms
nproc = len(os.sched_getaffinity(0)) * psutil.cpu_count(logical=False) // psutil.cpu_count(logical=True)
except AttributeError:
nproc = os.cpu_count()