iis服务器助手广告广告
返回顶部
首页 > 资讯 > 后端开发 > Python >AttributeError: module ‘numpy‘ has no attribute ‘object‘
  • 234
分享到

AttributeError: module ‘numpy‘ has no attribute ‘object‘

tensorflow 2023-09-14 21:09:56 234人浏览 泡泡鱼

Python 官方文档:入门教程 => 点击学习

摘要

我的这个是在tensorboard调用numpy的一些组件然后导致的出错。 尝试过升级numpy的版本但是没有奏效。 后面升级了tensorboard版本就可以了。 更新:升级tensorboard

我的这个是在tensorboard调用numpy的一些组件然后导致的出错。
尝试过升级numpy的版本但是没有奏效。
后面升级了tensorboard版本就可以了。

更新:升级tensorboard 会导致其他问题,所以上面的方法不可行。
这个问题的根源是tensorboard 和numpy的版本不一致。
我的项目要求tensorboard为2.5.0,网上查了一下,兼容的numpy可以是1.18.5。
然后这个numpy跟我之前安装好的matplotlib版本不兼容,
所以我把原来的matplotlib卸了,
重新安装了3.2.2 。

更新:
如果用pip uninstall 可以能会有些没删干净,
比如删numpy时,numpy folder 没删掉,
需要手动删。
当numpy, tensorboard, matplotlib都删了并且人工确认删干净了,
就:

pip install numpy==1.18.5 matplotlib==3.2.2 tensorboard==2.5.0 --target=install_target_dir

来源地址:https://blog.csdn.net/AliceH1226/article/details/128821182

--结束END--

本文标题: AttributeError: module ‘numpy‘ has no attribute ‘object‘

本文链接: https://www.lsjlt.com/news/407810.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作