运行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'的更多相关文章

  1. 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 ...

  2. Python报错module 'scipy.misc' has no attribute 'xxx'

    Python报错module 'scipy.misc' has no attribute 'imresize' 解决办法: 安装Pillow包,命令如下: pip install Pillow 然后重 ...

  3. module 'scipy.misc' has no attribute 'toimage',python

    anaconda环境下: 错误:python 命令行运行出错:module 'scipy.misc' has no attribute 'toimage' 解决:打开Anaconda prompt,输 ...

  4. Python报错——module 'scipy.misc' has no attribute 'imresize'

    报错是因为要安装PIL库,库名现在为Pillow,在命令行上安装即可: pip3 install Pillow

  5. ansible报错AttributeError: module 'urllib.request' has no attribute 'HTTPSHandler'

    报错内容: TASK [activemq : extract activemq tarball] *************************************************** ...

  6. AttributeError: module 'html.parser' has no attribute 'HTMLParseError'

    别人说这种错误大多是,因为beautifulsoup的版本兼容问题, 因为beautifulsoup的4.0以下版本和4.0版本与python3.5以上都不兼容, 网上的解决方案大多是:降python ...

  7. 读入图片显示scipy.misc module has no attribute imread?

    >>> import scipy >>> scipy.misc <module 'scipy.misc' from 'C:\Python27\lib\site ...

  8. pycharm最新版新建工程没导入本地包问题:module 'selenium.webdriver' has no attribute 'Firefox'

    前言 最新版的pycharm做了很大的改变,新建工程的时候,默认不导入本地的安装包,这就导致很多小伙伴踩坑了... 明明已经pip安装过selenium了,但是却报AttributeError:mod ...

  9. 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 ...

随机推荐

  1. jsp部分

    1,struts2下拉框,直接赋值.<s:select list="#{'':'---请选择---','0':'否','1':'是'}"listKey="key&q ...

  2. Implementing a Dynamic Vector (Array) in C(使用c实现动态数组Vector)

    An array (vector) is a common-place data type, used to hold and describe a collection of elements. T ...

  3. linux上传文件的命令——rz

    下面来看一下有关上传下载的说明. 1.rz.sz命令的安装方法 第一种方法:安装系统时选包包含rz.sz命令的包组 第二种方法:安装系统后通过执行yum install lrzsz -y 或 yum ...

  4. linux分区知识

    1.硬盘使用前,一般要分区,格式化(创建文件系统)--存放数据(极端情况下,可以不分区) 2.分区: 主分区. 扩展分区.逻辑分区 主分区+拓展分区的数量<=4,其中一个主分区可以用一个拓展分区 ...

  5. ioctl接口内容操作

    int ioctl( int fd, int request, .../* void *arg */ ) 详解 第三个参数总是一个指针,但指针的类型依赖于request 参数.我们可以把和网络相关的请 ...

  6. 【转帖】windows命令行中java和javac、javap使用详解(java编译命令)

    windows命令行中java和javac.javap使用详解(java编译命令) 更新时间:2014年03月23日 11:53:15   作者:    我要评论 http://www.jb51.ne ...

  7. [转帖]爬过这 6 个坡,你就能对 Linux 操作系统了如指掌

    爬过这 6 个坡,你就能对 Linux 操作系统了如指掌 http://www.51testing.com/html/16/n-4461316.html 学习的任务 任重道远 我现在处于第一阶段. 发 ...

  8. mysql拆分逗号一列变多行

    需求: SELECT ), ) FROM TABLE a INNER JOIN mysql.help_topic b )

  9. LOJ526「LibreOJ β Round #4」子集

    题目 算是比较裸的题吧. 首先我们把符合要求的\((i,j)\)建一条边,那么我们要求的就是最大团. 转化为补图的最小独立集. 然后我们来证明补图是一个二分图. \((u,v)\)有边\(\Leftr ...

  10. codeforces 620C

    题目链接:https://codeforces.com/problemset/problem/620/C 题目分析 题意:给你一串珍珠,每个珍珠都有一个对应值,需要分割这n个珍珠(必须连续),使得每一 ...