解决 ValueError: numpy.dtype size changed,may indicate binary incompatibility.

省流:重新安装所有相关的依赖库

pip uninstall numpy scipy pandas

pip install numpy scipy pandas

解决过程:

运行我的train.py文件后有以下报错

ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

错误原因可能是:由于 numpy 与其他库(例如 matplotlib 或其他依赖)之间的二进制兼容性问题引起的。特别是在不同版本的 numpy 和其他库之间进行升级时,可能会发生这种情况。

所以我按照网上其他办法将numpy库uninstall再install,以及更改numpy的版本等,但是都没能解决我的问题。
最后是重新安装所有相关的依赖库,成功解决问题。

pip uninstall numpy scipy pandas

pip install numpy scipy pandas

你可能感兴趣的:(numpy,python)