Error #15: Initializing libiomp5.dylib, but found libiomp5.dylib already initialized

Do the following to solve the issue:

import os

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

Answer found at: https://github.com/dmlc/xgboost/issues/1715

Be aware of potential side-effects:

but that may cause crashes or silently produce incorrect results.

Leave a Comment