Python错误:AttributeError:\uu输入\uuh

2022-05-21 07:12:06 发布

您现在位置:Python中文网/ 问答频道 /正文

I = mpimg.imread(FACE_INPUT_PATH + picname)
I_np = np.array(I)
Traceback (most recent call last):
    File "pretrain_load_test.py", line 67, in <module>
        I = mpimg.imread(FACE_INPUT_PATH + picname)
    File "/home/avicky/env/lib/python3.7/site-packages/matplotlib/image.py", 
        line 1417, in imread
            with Image.open(fname) as image:
    AttributeError: __enter__

Tags: pathinpyimagemostinputnplinearrayfilefacetracebackimreadmpimgpicname
1条回答
网友
1楼 ·

尝试更新你的libs,它看起来像是版本冲突

pip install -U pillow