python multiprocessing程序运行时,报错:
objc[2483]: +[__NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called.
objc[2483]: +[__NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
解决方法:添加环境变量:
OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
附图:
参考:
本文介绍了一种在macOS上运行Python多进程程序时遇到的错误,并提供了详细的解决方案。通过设置环境变量OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES来避免程序崩溃。
822

被折叠的 条评论
为什么被折叠?



