
**
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
完美运行!!!就这么简单!
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)