解决OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.

问题:Anaconda安装的numpy包中的libiomp5md.dll 和Pytorch中libiomp5md.dll冲突

解决方法:

  1. 添加环境变量:
    import os 
    os.environ["KMP_DUPLICATE_LIB_OK"]="TRUE"
  2. 降低numpy 版本
    pip install -U numpy==1.16.5

    Done!

你可能感兴趣的:(解决OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.)