【无标题】

【无标题】,第1张

**

ImportError: cannot import name ‘image’ from ‘PIL’ (D:\Program Files (x86)\Python38\lib\site-packages\PIL_init_.py)

**

这个问题折腾了我一个上午,始终想不明白,还删除了我的python36,也无济于事,找了一下以前的代码,终于解决了问题。

我的代码

import os
from PIL import image
import numpy as np
import h5py as h5`

问题描述:

解决方法:
修改代码from PIL import image为from PIL import Image

完美运行!!!就这么简单!

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/langs/869948.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-13
下一篇2022-05-13

发表评论

登录后才能评论

评论列表(0条)

    保存