乐趣区

关于程序员:Python报错ImportError-cannot-import-name-imresize

原文链接

Python 呈现谬误:

ImportError: cannot import name ‘imresize’

解决方案

首先装置 pillow:

pip install pillow

而后装置 scipy 晚期版本。

高级版 scipy 本不再蕴含函数 imresize,官网给出的解释及解决办法如下:

imresize is deprecated! imresize is deprecated in SciPy 1.0.0, and will be removed in 1.3.0. Use Pillow instead: numpy.array(Image.fromarray(arr).resize()).

装置晚期版本:

pip3 install scipy==1.1.0 --user

 
 

学习更多编程常识,请关注我的公众号:

代码的路

退出移动版