Python Numpy loaded morethan1 DLL from .libs 报错解决方案

  • 前言
  • 错误记录
    • 解决方案1
    • 解决方案2
  • 鸣谢

前言

装Pytorch环境的时候遇到两个错误记录一下.

错误记录

C:\Users txsimoson Anaconda3 envs env ovthon 37 lib site-packages numpyl distributor initpy:32: 
UserWarning; loaded morethan1 DLL from .libs:
C:\Uers txsimpson Anaconda3envs env python 3.7 lib site-packages numpyl. ibs libopenblas,YOHXLWVO7VESDPUVUADXEVJ0BGHIPAY.gfortran-win amd64.d11
C:\Users tximoson Anaconda3 envs env pvthon 3.7 lib site-packaees numov ,libs libopenblas,MCDJNK7WMPZ02ME277HJJRJ3JIKNDB7.efortran-win amd64.dll
stacklevel=1)

核心问题是
UserWarning; loaded morethan1 DLL from .libs:

解决方案1

重装 numpy

pip uninstall numpy
pip install numpy
pip install --upgrade numpy

解决方案2

找到 Python 路径下的 Lib\site-packages\numpy\.libs

如果你发现 2 个或更多库则删除多余的库
删除多余文件

鸣谢

Numpy User Warning: Loaded more than 1 DLL