-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiprocessing raises a RuntimeError when using Python >=3.8 on MacOS #24
Comments
Is the fix back-compatible to 3.7, which is still allowed and tested in the CI actions? Can you try submitting a PR, which will then run through the CI tests? |
Just wanted to update you that my fix doesn’t seem to solve all the issues on MacOS running newer versions of python. Despite working for smaller data sets (<10k objects), I got a The python 3.7 workaround seems to work for now, but I’m wondering if it’s going to cause more issues as more packages start to require later versions of python. As for fixes, on python 3.8+ and MacOS, the default process start method is "spawn" which requires any calls to |
This got me too, glad I found this thread. An easy solution in the meantime could be to update the install instructions here to install with python version 3.7 instead of 3.9 https://eazy-py.readthedocs.io/en/latest/eazy/install.html |
FYI, I don’t see this anywhere in the test suite and py37 won’t work for ‘Jwst’. On 12 Apr 2023, at 00.28, Christina Williams ***@***.***> wrote:
This got me too, glad I found this thread. An easy solution in the meantime could be to update the install instructions here to install with python version 3.7 instead of 3.9 https://eazy-py.readthedocs.io/en/latest/eazy/install.html
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
@christinawilliams John Weaver had the same issue and found a hack that solves the process start method AND the TimeoutError. You can set the start method when the |
On Mac systems using Python 3.8 and later, the process start method defaults to "spawn" which raises a RuntimeError if
mp.Pool
is not called within aif __name__ == '__main__':
block. I temporarily fixed this by callingmp.set_start_method('fork')
whenmultiprocessing
is imported at the start ofTemplateGrid
, however it may be better to do this by importingmultiprocessing
at the start ofphotoz.py
and setting the start method to 'fork' then.The text was updated successfully, but these errors were encountered: