Solve the error OMP: error # 15: initializing libiomp5. Dylib

resolvent

Method 1

conda install nomkl

It can be solved after installation

Method 2

Add in code

import os

os.environ["KMP_DUPLICATE_LIB_OK"] = "TRUE"

Problem analysis

The complete error is: OMP: error # 15: initializing libiomp5.dylib, but found libomp.dylib already initialized , the error is caused by repeatedly loading the DLL.

Reference article

Github I ssues:https ://github.com/dmlc/xgboost/issues/1715

Read More: