Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

regarding AttributeError: module 'scipy.misc' has no attribute 'imread'

I was trying some code segment,

from scipy import misc
im = misc.imread(file_image, True)

However, I got the error message such as

AttributeError: module 'scipy.misc' has no attribute 'imread'

What can be the reason of this?

like image 727
user297850 Avatar asked Apr 06 '18 04:04

user297850


People also ask

How do I install SciPy MISC in Python?

Python consists of pip command which is an official package installer. It is a package manager, we can install, delete, or update any package. We need to install pip for using the pip command. Once the requirement is satisfied we can use the pip command in terminal.

What is MISC in SciPy?

misc) Various utilities that don't have another home. Note that the Python Imaging Library (PIL) is not a dependency of SciPy and therefore the pilutil module is not available on systems that don't have PIL installed.


1 Answers

This is because imread was discontinued by scipy as of 1.2.0, to solve it you can either install Pillow with

    pip install Pillow

or downgrade to 1.1.0 with

    pip install scipy==1.1.0
like image 188
Mekaeel Malik Avatar answered Oct 03 '22 09:10

Mekaeel Malik