numpy版本过高输出错误信息
错误描述:
执行
python
导入tensorflow 模块
import tensorflow as tf
输出错误信息:
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_qint8 = np.dtype([("qint8", np.int8, 1)])
错误原因:安装numpy的版本过高
解决方法:安装低版本的numpy
pip install -U numpy==1.16.0
再次,导入tensorflow 模块,未出现错误信息
参考: https://blog.youkuaiyun.com/kobe_academy/article/details/99706595
本文解决了一个常见的问题:当使用高版本的numpy时,TensorFlow可能会出现警告信息,这涉及到numpy版本与TensorFlow的兼容性。文章详细介绍了错误的描述,即在导入tensorflow模块时出现的FutureWarning,解释了这是由于numpy版本过高导致的,并提供了解决方案,即降级numpy到1.16.0版本。
795

被折叠的 条评论
为什么被折叠?



