infocusp / tf_cnnvis

CNN visualization tool in TensorFlow
MIT License
780 stars 208 forks source link

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

Open scottmason2000 opened 5 years ago

scottmason2000 commented 5 years ago

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\miscinit.py)

What am I missing ???

liufangcen commented 4 years ago

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

ghylander commented 3 years ago

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

Eminencetoosure commented 2 years ago

! 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