from scipy.misc import imread - "ImportError: can not import name 'imread' solution

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/GFChong/article/details/91520270

The system displays an error:

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    from scipy.misc import imread, imsave, imresize
ImportError: cannot import name 'imread' from 'scipy.misc' (D:\Program Files (x86)\Python37\lib\site-packages\scipy\misc\__init__.py)

 Questions about imread and other functions can not be imported from scipy.misc, beginning from the Internet to find a lot of ways can not solve, including installing numpy + mkl, scipy, pillow library, libraries before installing scipy first installed numpy + mkl library, but still can not import imread commands.

After finally simply uninstalling and reinstalling python found ready to use! There are two caveats:

1. Before installing third-party libraries, do be sure to remember to install numpy + mkl, before installing scipy, pillow, and other third-party libraries, uci website clearly stated to be a lot of third-party libraries are dependent on numpy + mkl library work will be carried out on the basis of the installation, so be sure to first install! Although I also had installed the three libraries in the order, but still does not work, I personally think we should still have caused a conflict between the library and the library.

    uic site at  https://www.lfd.uci.edu   many third-party libraries whl file can be downloaded from here, is very slow ...

               

2. I use pycharm, when setting should be set to the Base interpreter yourself installation path python.exe of different development tools, system settings are different, to be configured correctly according to their own development tools

After these two steps, I believe the problem can be resolved.

---------------------------------------------------------------------------

As for the content of official documents scipy Speaking been removed imread commands, the official did make some adjustments, but this is why we need to add a pillow library in the library on the basis of scipy.

In addition, with regard to the handling and method of two-dimensional images, you can refer to this article https://blog.csdn.net/TeFuirnever/article/details/90896239

 

 

Guess you like

Origin blog.csdn.net/GFChong/article/details/91520270