报错:FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated

FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ‘(1,)type’. np_resource = np.dtype([(“resource”, np.ubyte, 1)])

  • 原因:安装的tensorflow版本和numpy版本不匹配。需要将numpy降版本。
    我的tensorflow版本: ‘1.12.0’,numpy版本“1.18.0”报错,我将numpy降为1.16.0不报错
  1. 方法一:终端:重新下载numpy
pip install numpy==1.16.0
  1. 方法二:如果有anaconda,可以在界面降级:
    报错:FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated_第1张图片

你可能感兴趣的:(机器学习与深度学习AI,tensorflow,anaconda)