gpt4 book ai didi

python - Error #15 : Initializing libiomp5. dylib,但发现 libiomp5.dylib 已经初始化

转载 作者:太空狗 更新时间:2023-10-29 17:21:35 35 4
gpt4 key购买 nike

在使用 matplotlib 时获取错误信息:

Error #15: Initializing libiomp5.dylib, but found libiomp5.dylib already initialized OMP: Hint: This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results. For more information, please see http://www.intel.com/software/products/support/.

最佳答案

执行以下操作来解决问题:

import os

os.environ['KMP_DUPLICATE_LIB_OK']='True'

答案位于:https://github.com/dmlc/xgboost/issues/1715

注意潜在的副作用:

but that may cause crashes or silently produce incorrect results.

关于python - Error #15 : Initializing libiomp5. dylib,但发现 libiomp5.dylib 已经初始化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53014306/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com