AttributeError: module 'scipy.misc' has no attribute 'imread'
运行python程序报错:AttributeError: module 'scipy.misc' has no attribute 'imread'
报错原因1:scipy版本过高
解决方案:降低scipy版本,如下:
pip install scipy==1.2.1
报错原因2:查看scipy.misc帮助文件得知,imread依赖于pillow
解决方法:在该python环境中,安装Pillow即可
pip install Pillow
AttributeError: module 'scipy.misc' has no attribute 'imread'的更多相关文章
- Tensorflow机器学习入门——AttributeError: module 'scipy.misc' has no attribute 'toimage'
这个bug的解决办法: import cv2 # scipy.misc.toimage(image_array).save('cifar10_data/raw/%d.jpg' % i) cv2.imw ...
- Python报错module 'scipy.misc' has no attribute 'xxx'
Python报错module 'scipy.misc' has no attribute 'imresize' 解决办法: 安装Pillow包,命令如下: pip install Pillow 然后重 ...
- module 'scipy.misc' has no attribute 'toimage',python
anaconda环境下: 错误:python 命令行运行出错:module 'scipy.misc' has no attribute 'toimage' 解决:打开Anaconda prompt,输 ...
- Python报错——module 'scipy.misc' has no attribute 'imresize'
报错是因为要安装PIL库,库名现在为Pillow,在命令行上安装即可: pip3 install Pillow
- ansible报错AttributeError: module 'urllib.request' has no attribute 'HTTPSHandler'
报错内容: TASK [activemq : extract activemq tarball] *************************************************** ...
- AttributeError: module 'html.parser' has no attribute 'HTMLParseError'
别人说这种错误大多是,因为beautifulsoup的版本兼容问题, 因为beautifulsoup的4.0以下版本和4.0版本与python3.5以上都不兼容, 网上的解决方案大多是:降python ...
- 读入图片显示scipy.misc module has no attribute imread?
>>> import scipy >>> scipy.misc <module 'scipy.misc' from 'C:\Python27\lib\site ...
- pycharm最新版新建工程没导入本地包问题:module 'selenium.webdriver' has no attribute 'Firefox'
前言 最新版的pycharm做了很大的改变,新建工程的时候,默认不导入本地的安装包,这就导致很多小伙伴踩坑了... 明明已经pip安装过selenium了,但是却报AttributeError:mod ...
- mac os 使用 from scipy.misc import imread ImportError: cannot import name 'imread'
mac os 使用 from scipy.misc import imread ImportError: cannot import name 'imread' 问题1: 我原先安装了 pillow ...
随机推荐
- MYSQL查询今天、昨天、7天前、30天、本月数据
今天: SELECT * FROM 表名 WHERE TO_DAYS( 时间字段名) = TO_DAYS(NOW()); 昨天: SELECT * FROM 表名 WHERE TO_DAYS( NOW ...
- EncryptFac 加解密小工具
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...
- Visual Studio 展开和折叠代码快捷键
每个cs文件代码太多,总数找不到方法.每次都是手动一个一个方法折叠手疼,赶紧搜索折叠展开快捷键. Ctrl + M + O: 折叠所有方法 Ctrl + M + M: 折叠或者展开当前方法 Ctr ...
- vlc 控件属性和方法
VLC调研 VLC控件支持的参数和方法 VLC对象列表 Vlc Plugin Object的方法 l VersionInfo:成员, 返回版本信息的字符串 l vlc.ve ...
- @autowired、@Qualifier、@Primary注解
@autowired 可以自动帮你把Bean里面引用的对象的setter/getter方法省略,自动帮你set/get. 启动spring IoC时,容器自动装载了一个AutowiredAnnotat ...
- 1.2.2 OSI参考模型 上
一.HCNA网络技术学习指南 为了实现网络的互通及各种各样的网络应用,网络设备需要运行各种各样的协议已实现各种各样具体的功能.面对各种各样且数量繁多的功能,我们可以从网络架构的角度,引入功能分层的模型 ...
- 学习shell的第三天
编程原理:1.编程介绍 早期编程: 驱动 硬件默认是不能使用的: 不同的厂家硬件设备之间需要进行指令沟通,我们需要驱动程序来进行“翻译”: 更趋近与硬件开发的工程师,要学习“汇编语言”:而“汇 ...
- 第五周课程总结&试验报告三
第五周课程总结 一.第五周课程总结 1.this关键字 this可用于任何实例方法内指向当前对象,也可指向对其调用当前方法的对象,或者在需要当前类型对象引用时使用.当一个类的属性(成员变量)名与访问该 ...
- [xpath] text()和string()区别
质区别 text()是一个node test,而string()是一个函数,data()是一个函数且可以保留数据类型.此外,还有点号(.)表示当前节点. 使用要点 XML例子: <book> ...
- t-sql最短路径搜索
SET STATISTICS IO ON; SET STATISTICS TIME ON; GO IF OBJECT_ID(N'dbo.t1') IS NOT NULL DROP TABLE dbo. ...