sklearn OMP: Error #15 (“Initializing libiomp5md.dll, but found mk2iomp5md.dll already initialized.”) when fitting models

I had the same problem, coming from conflicting installations in numpy and from canopy. Resolved it by writing:

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

Not an elegant solution, but it did the job for me.

Leave a Comment

tech