当前位置: 首页 > news >正文

【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"

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

http://www.lryc.cn/news/579671.html

相关文章:

  • 关于微前端框架micro,子应用设置--el-primary-color失效的问题
  • Linux性能分析工具
  • Oracle:报错jdbc:oracle:thin:@IP地址:端口:实例名, errorCode 28001, state 99999
  • Spark 4.0的VariantType 类型以及内部存储
  • 打造一个可维护、可复用的前端权限控制方案(含完整Demo)
  • 2025年4月SCI-吕佩尔狐优化算法Rüppell’s fox optimizer-附Matlab免费代码
  • 苹果手机扫描PDF:整理课堂笔记、保存重要文件
  • Intellij IDEA中Maven的使用
  • H3C-备件流程
  • EXCEL 基础函数
  • 论文阅读笔记——Autoregressive Image Generation without Vector Quantization
  • 构建引擎: 打造小程序编译器
  • 工业路由器赋能智慧电力储能柜实时通讯,构建电力智能化新生态
  • x搜索新增了x-client-transaction-id的验证
  • 网络工具如何帮助消除网络安全风险
  • 通达信 主力资金与成交量分析系统 幅图
  • 机器学习-03(机器学习任务攻略)
  • 边缘计算解决方案:数据中心机房IT设备数据采集与调优
  • STM32-PWM驱动无源蜂鸣器
  • 使用numpy的快速傅里叶变换的一些问题
  • AI+软件测试——03软件的缺陷及管理
  • 一、Docker:一场颠覆应用部署与运维的容器革命
  • 数学建模_时间序列
  • 月更!2025年7月鼠标入门及选购推荐(含无线鼠标、游戏鼠标)
  • 百度文心大模型 4.5 系列全面开源 英特尔同步支持端侧部署
  • 两个PHY芯片之间,是如何连接进行通信的?
  • Python Pytest-Benchmark详解:精准性能测试的利器
  • 两个手机都用同个wifi,IP地址会一样吗?如何更改ip地址
  • 禁止ifrmare标签上的文件,实现自动下载功能,并且隐藏工具栏
  • 搭建VirtualBox-6+vagrant_2+docker+mysql5.7的步骤