Open-source Languages & Tools for z/OS

 View Only
  • 1.  Statistical packages

    Posted 12-17-2018 16:50

    Hi everybody,

    I am trying to use Python statistical functions and getting the following error:

    raise NotImplementedError(‘cannot determine number of cpus’)

    that’s coming from the file
    /usr/lpp/python36/lib/python3.6/multiprocessing/context.py

    specifically from the lines 40-46
    num = os.cpu_count()
    if num is None
    raise NotImplementedError(‘cannot determine number of cpus’)
    else:
    return num

    Is there a way to make statistical packages work? Or make os.cpu_count() return 1?

    Thanks in advance

    UPDATE:
    I was able to override os.cpu_count() with the function that always returns ‘1’. So multiprocessing can initialize now and stats packages seem to work now.