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?
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With