When trying to load an image file with scipy.misc.imread()
, I receive this unexpected error:
Traceback (most recent call last):
File "/home/ghita/PycharmProjects/image_processing/venv/test1.py", line 2, in <module>
from scipy.misc import imread, imsave
ImportError: cannot import name 'imread' from 'scipy.misc' (/home/ghita/PycharmProjects/image_processing/venv/lib/python3.8/site-packages/scipy/misc/__init__.py)
Why does this fail?
It looks like imread
has been removed from scipy.misc
. They now recommend that you use imread
from the imageio package .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.