astroARIADNE icon indicating copy to clipboard operation
astroARIADNE copied to clipboard

Mac OS set_start_method issue in fitter.py

Open lnicastro opened this issue 1 year ago • 1 comments

To have the code to work on my Mac (Catalina), I had to change line 47 from:

    set_start_method('fork')

to:

    if sys.platform == 'darwin':
        set_start_method('spawn')
    else:
        set_start_method('fork')

lnicastro avatar Dec 01 '23 15:12 lnicastro

Thanks! I'll include this in the code :)

jvines avatar Feb 05 '24 18:02 jvines

I had a similar issue, however, regardless of whether I use 'spawn' or 'fork', I need to add "force=True", otherwise I get the following error message:

raise RuntimeError('context has already been set')

RuntimeError: context has already been set

I'm on a M1-mac running macOS Monterey v12.3 with the following Python: Python 3.12.3 | packaged by Anaconda, Inc. | (main, May 6 2024, 14:46:42) [Clang 14.0.6 ] on darwin

Despite the confusing "on darwin", both my conda and python are (supposedly) running on native M1 architecture:

import platform print(platform.processor()) arm

jgagneastro avatar May 16 '24 16:05 jgagneastro