python的imageio引用失败怎么办

词云引用imageio出现错误DeprecationWarning: Starting with ImageIO v3 the behavior of this function will switch to that of iio.v3.imread. To keep the current behavior (and make this warning disappear) use import imageio.v2 as imageio or call imageio.v2.imread directly.按照上面改了还是没用怎么办

将 imageio.imread 替换为 imageio.v3.imread,或者直接使用 imageio.v2.imread。

不知道你这个问题是否已经解决, 如果还没有解决的话:

如果你已经解决了该问题, 非常希望你能够分享一下解决方案, 写成博客, 将相关链接放在评论区, 以帮助更多的人 ^-^

##from imageio import imread
import imageio.v2 as imageio

将以上第一行 修改为第二行后 按以下代码指定图片即可

mask_heart = imageio.imread("pic_heart_mask.png") #使用遮罩 确定生成的词云的形状