AttributeError: module ‘matplotlib‘ has no attribute ‘image‘
every blog every motto: We would rather reuse an active dwarf than a sleeping giant.
0. 前言
记录
1. 正文
报错
AttributeError: module 'matplotlib' has no attribute 'image'
代码如下
import matplotlibprint(matplotlib.__version__)
y_true = matplotlib.image.imread("./data/gt/labels_41r_51c.tif")
print("y-true", y_true)
解决方法
代入时,导入如下即可
import matplotlib.image as img
完整代码
import matplotlib
import matplotlib.image as imgy_true = matplotlib.image.imread("./data/gt/labels_41r_51c.tif")
奇怪的解决方法……
AttributeError: module ‘matplotlib‘ has no attribute ‘image‘相关推荐
- AttributeError: module ‘matplotlib’ has no attribute ‘figure’
报错:AttributeError: module 'matplotlib' has no attribute 'figure' 修改前: import matplotlib as plt plt.f ...
- AttributeError: module ‘matplotlib’ has no attribute ‘artist’
参考:https://github.com/matplotlib/matplotlib/issues/6771/ 还有这个:https://interviewbubble.com/attributee ...
- 运行matplotlib出现:AttributeError: module ‘matplotlib‘ has no attribute ‘verbose‘
如果你反复检测代码没有发现错误,在运行代码时却出现这个问题,那么以下有两种方法可以解决 方法一:在import matplot.pyplot as plt导入包之前添加这样一条代码: import m ...
- python时 module 'matplotlib' has no attribute 'figure'解决
再用python编写代码时,可视化时我们会用到matplotlib这个包,在调用fig = plt.figure() 报错显示:AttributeError: module 'matplotlib' ...
- AttributeError: module 'matplotlib.mlab' has no attribute 'normpdf'
AttributeError: module 'matplotlib.mlab' has no attribute 'normpdf' 在练习直方图时报错: Traceback (most recen ...
- 解决AttributeError: module ‘matplotlib.mlab‘ has no attribute ‘normpdf‘
解决AttributeError: module 'matplotlib.mlab' has no attribute 'normpdf' 报错代码 y = mlab.normpdf(bins, mu ...
- Python3 AttributeError: module 'cv2' has no attribute 'SIFT'
参考 https://blog.csdn.net/yuxuan_08/article/details/87966840 在用python3使用sift = cv2.SIFT()进行SIFT时候,可能会 ...
- AttributeError: module 'networkx' has no attribute 'draw_graphviz'解决方案
环境: Python2.7 (64).ubuntu环境下 被运行的代码来自<Python自然语言处理>的P185-186,代码如下: P185-186.py import networkx ...
- 解决: AttributeError: module 'cv2' has no attribute 'SURF'
AttributeError: module 'cv2' has no attribute 'SURF' 遇到该问题时,网友多是建议补个包,即pip install opencv-contrib-py ...
- AttributeError: module ‘seaborn‘ has no attribute ‘tsplot‘
AttributeError: module 'seaborn' has no attribute 'tsplot' 问题: g = sns.tsplot(df['pm2.5']) plt.figur ...
最新文章
- MySQL数据类型之数字类型详细解析
- 背景建模之单高斯实现
- 插入排序的基本原理及实现
- 已经搭载华为鸿蒙,阿尔法S或将搭载华为鸿蒙OS , 4月17极狐带来真相!
- 利用Inotify和Rsync将webproject文件自己主动同步到多台应用server
- emui华为java2p_大文件包来了!两款华为手机依然在更新,EMUI两大功能很实用
- SAP 主数据-地点表
- android 蒙层广告1,subnvue安卓机打开只显示蒙层,没有任何内容【报Bug】
- 数据结构之树和二叉树的应用:二叉排序树(BST)
- 手把手教你编写Logstash插件
- Pythonseleniumtesseract自动化测试随机码、验证码(Captcha)的OCR识别解决方案参考
- java当前类路径_java获取当前类的绝对路径
- 一个数的约数(个数。约数和)
- asp.net有效使用缓存(转)
- spark streaming之 windowDuration、slideDuration、batchDuration​
- Excel 英文切换大小写;Excel 中去除重复项
- scrapy项目部署
- matlab红外遥感温度反演,热红外遥感地表温度反演研究现状与发展趋势
- 电子负载的 Von/Voff 设置
- 【网络安全】威胁情报信息
热门文章
- 微服务学习之Hystrix容错保护【Hoxton.SR1版】
- springboot处理静态资源
- python项目练手(一)------飞船大战游戏
- python 数据 模块 好用_Python最被低估的库,用好了效率提升10倍!
- 中文只占一个字符_男人宠妻的三大表现,就算只占一个,你都是嫁对了人!
- cpuz测试分数天梯图_最新手机处理器天梯图出炉:第一实至名归,你手机处理器排名高吗...
- 设备树与驱动的关系_9 Linux设备树的原理与应用实例(一)—— 什么是设备树...
- 涉密文件检查工具_保密文件销毁咨询
- Cesium:在地球上加载Geoserver图层
- mysql explain命令解析_详解MySQL中EXPLAIN解释命令