报错:OMP: Error #15: Initializing libomp.dylib, but found libiomp5.dylib already initialized.

简介: 报错:OMP: Error #15: Initializing libomp.dylib, but found libiomp5.dylib already initialized.

问题描述:


OMP: 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"


If you are using Python distributed by Conda, then it is highly likely that the error is caused by the numpy package from Conda which includes the mkl package which in turn conflicts with the system-wide library. In this case you can update the numpy package in Conda or replace the Conda’s OpenMP library instance with system-wide one by creating a symlink to it in Conda environment folder $CONDA_PREFIX/lib.

如果Python是基本于Conda安装的,则Conda上的numpy包中的mkl很容易与系统内库发生冲突,可选择update numpy package in Conda或者设置为系统库。


通过降低matplotlib的版本,即conda install matplotlib=2.2.3来解除阻塞

目录
相关文章
|
Ubuntu Unix Linux
成功解决ERROR: Unable to find the development tool `cc` in your path; please make sure that you have the
成功解决ERROR: Unable to find the development tool `cc` in your path; please make sure that you have the
成功解决ERROR: Unable to find the development tool `cc` in your path; please make sure that you have the
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped
475 0
|
NoSQL MongoDB
mongod: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No s
mongod: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No s
571 0
|
Java Android开发
Failed to load JavaHL Library.These are the errors that were encountered:no msvcp100 in java.library
Failed to load JavaHL Library.These are the errors that were encountered:no msvcp100 in java.library
OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.
OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.
|
并行计算
解决Error #15: Initializing libiomp5.dylib, but found libomp.dylib already initialized.
解决Error #15: Initializing libiomp5.dylib, but found libomp.dylib already initialized.
428 0
dyld Library not loaded Reason image not found 问题解决
添加第三方框架,然后启动app的时候会,提示dyld: Library not loaded: Reason: image not found 网上大部分的做法都是把Build Phases 里对应framework后边的选项修改成为Optional,但这个是治标不治本,还是没法解决问题
207 0
x86_64-linux-gnu/libgdk-x11-2.0.so: error adding symbols: DSO missing from command line
x86_64-linux-gnu/libgdk-x11-2.0.so: error adding symbols: DSO missing from command line
240 0
|
Perl
ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1
ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1
706 0
|
机器学习/深度学习 并行计算 PyTorch
解决| “OMP: Error #15: Initializing libiomp5md.dll,”
解决| “OMP: Error #15: Initializing libiomp5md.dll,”
3150 0