运行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. linux常用命令(11)less命令

    less 工具也是对文件或其它输出进行分页显示的工具,应该说是linux正统查看文件内容的工具,功能极其强大.less 的用法比起 more 更加的有弹性.在 more 的时候,我们并没有办法向前面翻 ...

  2. CentOS下安装完php外网无法访问的问题

    1. cd /etc/selinux/ vim config SELINUX=disabled 2.通过界面关闭防火墙

  3. dockerfile中配置时区

    https://www.cnblogs.com/kevingrace/p/5570597.html #设置时区RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai ...

  4. nginx配置443端口

    参照地址:    https://www.cnblogs.com/tianhei/p/7726505.html       https://blog.csdn.net/cjs5202001/artic ...

  5. go使用go-redis操作redis 连接类型,pipline, 发布订阅

    内容: 一 . 客户端Client(普通模式,主从模式,哨兵模式)二. conn连接(连接, pipline, 发布订阅等)三. 示例程序(连接, pipline, 发布订阅等)客户端Client 普 ...

  6. httpClient 进行get请求

    String url = baseUrl; logger.info("checkIfTheFolderIsExist"); CloseableHttpClient httpClie ...

  7. 利用js代码自动删除稿件的普通弹幕

    事情的起因是在b站投稿了一个高级弹幕测试的视频(av9940487),但是由于b站的弹幕池机制是新的弹幕顶掉旧的弹幕,所以导致一些人发的高级弹幕很快就被顶掉了. 所以就想着写个脚本来自动删除属性为普通 ...

  8. eclipse 安装TestNg

    通过eclipse安装TestNg,过程如下: 1.点击help-->Install New Software 2.打开如下窗口,点击add,name自定义输入,Location中输入http: ...

  9. CentOS7 中arp欺骗,如何让你玩游戏的室友早点睡觉?

    环境:CentOS7 Linux安装arpspoof进行arp攻击实验 arpspoof是dsniff的一个组件,主要用于进行arp欺骗使用,所以说我们需要安装dsniff,虽然有很多看起来很容易,但 ...

  10. 简单的利用nginx部署前端项目

    网上有很多教程写的一大堆东西,新手可能会有点看不懂,现在我写这篇文章是为了更好的帮助新手,如何将自己的前端项目部署到自己的服务器上. 首先我们必须要有一台自己的ubuntu服务器,如果没有可以去阿里云 ...