Geeks, please accept the hero post of 2021 Microsoft x Intel hacking contest>>>
Python error module ‘SciPy. Misc’ has no attribute ‘imresize’
Solution:
To install the pilot package, the command is as follows:
pip install Pillow
Then restart the python environment
Python error module ‘SciPy. Misc’ has no attribute ‘imread’
Solution:
Most of the solutions are to say that PIL third-party library is not installed. The library name is now pilow. It is recommended to use the command PIP install pilow to install directly. However, my problem has not been solved. I still report an error attributeerror: module ‘science. Misc’ has no attribute ‘imread’
after searching and trying, it is found that there is a problem with the version of SciPy, which can be perfectly solved by demoting to SciPy = = 1.2.1pip install scipy==1.2.1
reasons:
If you look at many of the latest versions of scipy.misc.imresize, you will find the following at the top:
Imresize is not recommended
Imresize is obsolete in SciPy 1.0.0 and will be removed in 1.3.0
Use pillow instead: numpy. Array (image. Fromarray (ARR). Reset())
The 1.3.0 release was released yesterday, so if SciPy is downloaded on the system today, you may have obtained a new version, which will no longer be able to use the function
The document I quoted above proposes a code snippet (using numpy and PIL) that can be substituted
therefore, the root cause of the above similar problems is still the problem of the SciPy version
Similar Posts:
- Solve the problem of Attributeerror: module ‘SciPy. Misc’ has no attribute ‘imread’
- python from scipy.misc import imread:ImportError: cannot import name imread
- [Solved] ImportError: cannot import name ‘imread’
- The solution of “importerror: DLL load failed: unable to find the specified module”
- Windows Python Install: requires numpy+mkl & ImportError: cannot import name NUMPY_MKL
- Solution for oserror: [errno 1] operation not permitted encountered when installing tensorflow
- AttributeError: module ‘cv2’ has no attribute ‘SIFT’ [How to Solve]
- Failed to load the native TensorFlow runtime [Solved]
- Scipy ValueError: ‘arr’ does not have a suitable array shape for any mode.
- Error in installing SciPy and Matplotlib