Setting & Error

[Python] OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized

uding9 2021. 8. 11. 01:24
반응형

주피터 노트북으로 matplotlib을 사용해 그래프를 그리려는데 "kernel dead" 커널이 죽었음

아래와 같은 메시지가 떴음

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/.

 

구글링을 한 결과 stackoverflow에서 해답을 얻음

https://stackoverflow.com/questions/20554074/sklearn-omp-error-15-when-fitting-models

 

sklearn OMP: Error #15 when fitting models

I have recently uninstalled a nicely working copy of Enthought Canopy 32-bit and installed Canopy version 1.1.0 (64 bit). When I try to use sklearn to fit a model my kernel crashes, and I get the

stackoverflow.com

 

 

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

위의 코드로 먼저 세팅한 후 코드 실행하면 잘 돌아감

반응형