I get this error when I'm running Python 3.6 Jupyter notebooks in the console.
OMP: Error #15: Initializing libiomp5.dylib, but found libomp.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=TRUEto 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/.
I have a few different versions of ligomp:
(µ_env) jespinozlt-osx:lib jespinoz$ pwd
/Users/jespinoz/anaconda/envs/µ_env/lib
(µ_env) jespinozlt-osx:lib jespinoz$ ls -lhtr | grep "omp"
-rw-rw-r--    4 jespinoz  tigr   165B Oct 28  2016 libgomp.spec
-rw-rw-r--    4 jespinoz  tigr   108K Oct 28  2016 libgomp.a
-rwxrwxr-x   11 jespinoz  tigr    62K Oct 28  2016 libgomp.1.dylib
-rwxrwxr-x    6 jespinoz  tigr   489K Oct 27 17:30 libomp.dylib
-rwxrwxr-x    5 jespinoz  tigr   176K Mar 14 13:10 libiompstubs5.dylib
-rwxrwxr-x    5 jespinoz  tigr   296K Mar 14 13:10 libiomp5_db.dylib
-rwxrwxr-x    5 jespinoz  tigr   2.7M Mar 14 13:10 libiomp5.dylib
lrwxr-xr-x    1 jespinoz  tigr    15B Apr 10 14:51 libgomp.dylib -> libgomp.1.dylib
A quick patch is this:
import os
os.environ['KMP_DUPLICATE_LIB_OK']='True'
How can I properly fix this? Do I need to delete my entire conda and start over?