tf_cnnvis icon indicating copy to clipboard operation
tf_cnnvis copied to clipboard

Code won't run: ImportError: cannot import name 'imsave' from 'scipy.misc'

Open scottmason2000 opened this issue 5 years ago • 3 comments

I ran all of these from InFoCusp/tf_cnnvis

pip install setuptools pip install six python setup.py install python setup.py clean

from scipy.misc import imsave # in *** init.py *** of tf_cnnvis

Error: ImportError: cannot import name 'imsave' from 'scipy.misc' (C:\projects\TensorFlow-MIL\venv\lib\site-packages\scipy\misc_init_.py)

What am I missing ???

scottmason2000 avatar Jul 15 '19 23:07 scottmason2000

maybe your scipy version is high. you can try scipy==1.2.0.

liufangcen avatar Dec 11 '19 02:12 liufangcen

either install old versions of scipy, or in the scripts replace imsave with imageio.imwrite

ghylander avatar Jan 19 '21 11:01 ghylander

! pip install -U scipy==1.2.0

Rolling back uninstall of scipy Moving to /Users/apple/opt/anaconda3/lib/python3.9/site-packages/scipy-1.7.3.dist-info/ from /Users/apple/opt/anaconda3/lib/python3.9/site-packages/~cipy-1.7.3.dist-info Moving to /Users/apple/opt/anaconda3/lib/python3.9/site-packages/scipy/ from /Users/apple/opt/anaconda3/lib/python3.9/site-packages/~cipy

can you please tell me what I am doing wrong..?

from scipy.misc import imsave, imread, imresize I can use the above line of code

Eminencetoosure avatar Sep 15 '22 15:09 Eminencetoosure