一、问题描述
报错如下
yxguan@ubuntu:~/NewData10646$ python split_1d_10s_7classes_10588_fusion.py
Traceback (most recent call last):
File "split_1d_10s_7classes_10588_fusion.py", line 18, in <module>
rng = np.random.default_rng(12345)
AttributeError: module 'numpy.random' has no attribute 'default_rng'
是由于numpy的版本过低引起的,升级numpy的版本即可
二、问题解决
1.为避免出错,先卸载已有的numpy版本
pip list
我发现自己有两个版本同时存在,全部删干净,然后再重新安装
pip uninstall numpy
pip install numpy
可见问题解决