AttributeError: module ‘scipy.misc‘ has no attribute ‘imsave‘

created at 10-16-2021 views: 68

two ideas

  1. Modify the relevant function name in the code to the current version function name
  2. reduce scipy to a suitable version

For the sake of simplicity, here is the method of downgrading

# Use conda to search for the installable version

conda search scipy

Loading channels: done
# Name                       Version           Build  Channel             
scipy                         0.19.1 py27_nomklhda24f63_3  pkgs/main           
scipy                         0.19.1  py27h1edc525_3  pkgs/main           
scipy                         0.19.1 py35_nomklh614202b_3  pkgs/main           
scipy                         0.19.1  py35ha8f041b_3  pkgs/main           
scipy                         0.19.1 py36_nomklh59deb5f_3  pkgs/main           
scipy                         0.19.1  py36h9976243_3  pkgs/main           
scipy                          1.0.0 py27_nomklhc4f40eb_0  pkgs/main           
scipy                          1.0.0  py27hf5f0f52_0  pkgs/main           
scipy                          1.0.0 py35_nomklhb72a26a_0  pkgs/main           
scipy                          1.0.0  py35hcbbe4a2_0  pkgs/main           
scipy                          1.0.0 py36_nomklh9d91e6a_0  pkgs/main           
scipy                          1.0.0  py36hbf646e7_0  pkgs/main           
scipy                          1.0.1 py27_nomklh9d22d0a_0  pkgs/main           
scipy                          1.0.1  py27hfc37229_0  pkgs/main           
scipy                          1.0.1 py35_nomklh9d22d0a_0  pkgs/main           
scipy                          1.0.1  py35hfc37229_0  pkgs/main           
scipy                          1.0.1 py36_nomklh9d22d0a_0  pkgs/main           
scipy                          1.0.1  py36hfc37229_0  pkgs/main           
scipy                          1.1.0 py27_nomklh9c1e066_0  pkgs/main           
scipy                          1.1.0 py27_nomklh9d22d0a_0  pkgs/main           
scipy                          1.1.0 py27_nomklhb74e8f7_0  pkgs/main           
scipy                          1.1.0  py27h7c811a0_2  pkgs/main           
scipy                          1.1.0  py27h9b217d5_1  pkgs/main           
scipy                          1.1.0  py27hc49cb51_0  pkgs/main           
scipy                          1.1.0  py27hd20e5f9_0  pkgs/main           
scipy                          1.1.0  py27he2b7bc3_1  pkgs/main           
scipy                          1.1.0  py27he2b7bc3_2  pkgs/main           
scipy                          1.1.0  py27hfa4b5c9_1  pkgs/main           
scipy                          1.1.0  py27hfc37229_0  pkgs/main           
scipy                          1.1.0 py35_nomklh9d22d0a_0  pkgs/main           
scipy                          1.1.0  py35h9b217d5_1  pkgs/main           
scipy                          1.1.0  py35hd20e5f9_0  pkgs/main           
scipy                          1.1.0  py35he2b7bc3_1  pkgs/main           
scipy                          1.1.0  py35hfa4b5c9_1  pkgs/main           
scipy                          1.1.0  py35hfc37229_0  pkgs/main           
scipy                          1.1.0 py36_nomklh9c1e066_0  pkgs/main           
scipy                          1.1.0 py36_nomklh9d22d0a_0  pkgs/main           
scipy                          1.1.0  py36h7c811a0_2  pkgs/main           
scipy                          1.1.0  py36h9b217d5_1  pkgs/main           
scipy                          1.1.0  py36hc49cb51_0  pkgs/main           
scipy                          1.1.0  py36hd20e5f9_0  pkgs/main           
scipy                          1.1.0  py36he2b7bc3_1  pkgs/main           
scipy                          1.1.0  py36he2b7bc3_2  pkgs/main           
scipy                          1.1.0  py36hfa4b5c9_1  pkgs/main           
scipy                          1.1.0  py36hfc37229_0  pkgs/main           
scipy                          1.1.0 py37_nomklh9c1e066_0  pkgs/main           
scipy                          1.1.0  py37h7c811a0_2  pkgs/main           
scipy                          1.1.0  py37h9b217d5_1  pkgs/main           
scipy                          1.1.0  py37hc49cb51_0  pkgs/main           
scipy                          1.1.0  py37he2b7bc3_1  pkgs/main           
scipy                          1.1.0  py37he2b7bc3_2  pkgs/main           
scipy                          1.1.0  py37hfa4b5c9_1  pkgs/main           
scipy                          1.2.0  py27h7c811a0_0  pkgs/main           
scipy                          1.2.0  py27he2b7bc3_0  pkgs/main           
scipy                          1.2.0  py36h7c811a0_0  pkgs/main           
scipy                          1.2.0  py36he2b7bc3_0  pkgs/main           
scipy                          1.2.0  py37h7c811a0_0  pkgs/main           
scipy                          1.2.0  py37he2b7bc3_0  pkgs/main           
scipy                          1.2.1  py27h7c811a0_0  pkgs/main           
scipy                          1.2.1  py27he2b7bc3_0  pkgs/main           
scipy                          1.2.1  py36h7c811a0_0  pkgs/main           
scipy                          1.2.1  py36he2b7bc3_0  pkgs/main           
scipy                          1.2.1  py37h7c811a0_0  pkgs/main           
scipy                          1.2.1  py37he2b7bc3_0  pkgs/main           
scipy                          1.3.0  py36h7c811a0_0  pkgs/main           
scipy                          1.3.0  py36he2b7bc3_0  pkgs/main           
scipy                          1.3.0  py37h7c811a0_0  pkgs/main           
scipy                          1.3.0  py37he2b7bc3_0  pkgs/main           
scipy                          1.3.1  py36h7c811a0_0  pkgs/main           
scipy                          1.3.1  py36he2b7bc3_0  pkgs/main           
scipy                          1.3.1  py37h7c811a0_0  pkgs/main           
scipy                          1.3.1  py37he2b7bc3_0  pkgs/main           
scipy                          1.3.1  py38h7c811a0_0  pkgs/main           
scipy                          1.3.1  py38he2b7bc3_0  pkgs/main           
scipy                          1.3.2  py36h7c811a0_0  pkgs/main           
scipy                          1.3.2  py36he2b7bc3_0  pkgs/main           
scipy                          1.3.2  py37h7c811a0_0  pkgs/main           
scipy                          1.3.2  py37he2b7bc3_0  pkgs/main           
scipy                          1.3.2  py38h7c811a0_0  pkgs/main           
scipy                          1.3.2  py38he2b7bc3_0  pkgs/main           
scipy                          1.4.1  py36h0b6359f_0  pkgs/main           
scipy                          1.4.1  py36habc2bb6_0  pkgs/main           
scipy                          1.4.1  py37h0b6359f_0  pkgs/main           
scipy                          1.4.1  py37habc2bb6_0  pkgs/main           
scipy                          1.4.1  py38h0b6359f_0  pkgs/main           
scipy                          1.4.1  py38habc2bb6_0  pkgs/main           
scipy                          1.5.0  py36h0b6359f_0  pkgs/main           
scipy                          1.5.0  py36habc2bb6_0  pkgs/main           
scipy                          1.5.0  py37h0b6359f_0  pkgs/main           
scipy                          1.5.0  py37habc2bb6_0  pkgs/main           
scipy                          1.5.0  py38h0b6359f_0  pkgs/main           
scipy                          1.5.0  py38habc2bb6_0  pkgs/main           
scipy                          1.5.2  py36h0b6359f_0  pkgs/main           
scipy                          1.5.2  py36habc2bb6_0  pkgs/main           
scipy                          1.5.2  py37h0b6359f_0  pkgs/main           
scipy                          1.5.2  py37habc2bb6_0  pkgs/main           
scipy                          1.5.2  py38h0b6359f_0  pkgs/main           
scipy                          1.5.2  py38habc2bb6_0  pkgs/main           
scipy                          1.5.2  py39h91f5cce_0  pkgs/main           
scipy                          1.5.2  py39hf56f3a7_0  pkgs/main           
scipy                          1.6.0  py37h91f5cce_0  pkgs/main           
scipy                          1.6.0  py37hf56f3a7_0  pkgs/main           
scipy                          1.6.0  py38h91f5cce_0  pkgs/main           
scipy                          1.6.0  py38hf56f3a7_0  pkgs/main           
scipy                          1.6.0  py39h91f5cce_0  pkgs/main           
scipy                          1.6.0  py39hf56f3a7_0  pkgs/main           
scipy                          1.6.1  py37h91f5cce_0  pkgs/main           
scipy                          1.6.1  py37hf56f3a7_0  pkgs/main           
scipy                          1.6.1  py38h91f5cce_0  pkgs/main           
scipy                          1.6.1  py38hf56f3a7_0  pkgs/main           
scipy                          1.6.1  py39h91f5cce_0  pkgs/main           
scipy                          1.6.1  py39hf56f3a7_0  pkgs/main           
scipy                          1.6.2  py37h91f5cce_0  pkgs/main           
scipy                          1.6.2  py37had2a1c9_1  pkgs/main           
scipy                          1.6.2  py37hf56f3a7_0  pkgs/main           
scipy                          1.6.2  py37hf56f3a7_1  pkgs/main           
scipy                          1.6.2  py38h91f5cce_0  pkgs/main           
scipy                          1.6.2  py38had2a1c9_1  pkgs/main           
scipy                          1.6.2  py38hf56f3a7_0  pkgs/main           
scipy                          1.6.2  py38hf56f3a7_1  pkgs/main           
scipy                          1.6.2  py39h91f5cce_0  pkgs/main           
scipy                          1.6.2  py39had2a1c9_1  pkgs/main           
scipy                          1.6.2  py39hf56f3a7_0  pkgs/main           
scipy                          1.6.2  py39hf56f3a7_1  pkgs/main           
scipy                          1.7.1  py37h292c36d_2  pkgs/main           
scipy                          1.7.1  py37hc65b3f8_2  pkgs/main           
scipy                          1.7.1  py38h292c36d_2  pkgs/main           
scipy                          1.7.1  py38hc65b3f8_2  pkgs/main           
scipy                          1.7.1  py39h292c36d_2  pkgs/main           
scipy                          1.7.1  py39hc65b3f8_2  pkgs/main    

Uninstall the current version

# Since it was installed by pip, use pip to uninstall

pip uninstall scipy

Found existing installation: scipy 1.5.4
Uninstalling scipy-1.5.4:
  Would remove:
    /home/zql/anaconda3/envs/torch04/lib/python3.6/site-packages/scipy-1.5.4.dist-info/*
    /home/zql/anaconda3/envs/torch04/lib/python3.6/site-packages/scipy.libs/libgfortran-ed201abd.so.3.0.0
    /home/zql/anaconda3/envs/torch04/lib/python3.6/site-packages/scipy.libs/libopenblasp-r0-085ca80a.3.9.so
    /home/zql/anaconda3/envs/torch04/lib/python3.6/site-packages/scipy/*
Proceed (Y/n)? y
  Successfully uninstalled scipy-1.5.4

Install lower version

The specific installation command is [Successfully resolved]

conda install scipy=0.19.1
created at:10-16-2021
edited at: 10-16-2021: