jvines / astroARIADNE

Easy stellar SED fitting!
MIT License
57 stars 7 forks source link

Mac OS set_start_method issue in fitter.py #52

Closed lnicastro closed 4 months ago

lnicastro commented 11 months ago

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')
jvines commented 9 months ago

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

jgagneastro commented 6 months ago

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