【tensorflow2.6.0 一系列相关报错记录】

tensorflow2.6.0出现的一些列报错记录

(1)tensorflow出现的numpy报错

ImportError: this version of pandas is incompatible with numpy < 1.20.3
your numpy version is 1.19.5.
Please upgrade numpy to >= 1.20.3 to use this pandas version

pip install --upgrade numpy

更新后出现报错(2)

(2)更新numpy后又出现的报错

AttributeError: module ‘numpy’ has no attribute ‘object’.
np.object was a deprecated alias for the builtin object. To avoid this error in existing code, use object by itself. Doing this will not modify any behavior and is safe.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
出现这个问题重新安装numpy1.19.5,又出现下面报错(3)
尝试修改
File ~\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\framework\dtypes.py:585,将np.object替换为object
在这里插入图片描述
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:
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
ImportError: cannot import name ‘dtensor’ from ‘tensorflow.compat.v2.experimental’

(3)安装修改完成后又出现的报错

ImportError: Matplotlib requires numpy>=1.20; you have 1.19.5

(4)改了半天还是出现奇怪的报错(终极解决办法)

首先删除C:\Users\songlin\AppData\Roaming\Python\Python38\site-packages\tensorflow这个文件夹,重新安装tensorflow

pip install --upgrade tensorflow

旧环境配置

conda info --envs | grep songlin_temp
pip list | grep -E "tensorflow|numpy|pandas|matplotlib"

记录之前配置过的环境
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值