跳转到内容
新建笔记

ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C head

解决方法:

numpy版本问题,更新

pip install numpy —upgrade

问题二:

AttributeError: module ‘numpy’ has no attribute ‘bool’. `np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

解决方法:

pip install numpy==1.23.2

重启系统。

成功解决AttributeError: module ‘numpy‘ has no attribute ‘bool‘._attributeerror: module ‘numpy’ has no attribute ‘b-CSDN博客


来源:CSDN 原文,首次发布于 2024-06-01。