You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
现在是:2024年5月份
现在最新的numpy版本是2.4
但是目前在requirements-server.txt文件中,没有指定numpy的版本
如果直接运行会报错
查资料后了解到这个是因为正在使用np.bool,而这在NumPy 1.20中已被弃用。
所以解决办法就是降级:
conda install numpy=1.20
pip install numpy==1.20
(我降到1.20没有报错,其他版本没试过)
希望最好是requirements-server.txt指定一下用的numpy版本
The text was updated successfully, but these errors were encountered: