OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program.

When installing paddle, the following error occurred:

OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll 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/.

Online solution:

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

But the symptoms are not the root cause.
This problem occurs mainly because the paddle package contains a file named libiomp5md.dll, which conflicts with the same file in the Anaconda environment, so one needs to be deleted.

Search in the Anaconda folder, as shown in the figure below, delete the libiomp5md.dll file in the Anaconda package, which is the one selected in the figure below.
insert image description here
After deleting it, search
insert image description here
for libiomp5md.dll under anaconda and can't find it.

Guess you like

Origin blog.csdn.net/hhhhhhhhhhwwwwwwwwww/article/details/123998470