簡體   English   中英

Python 錯誤:AttributeError: __enter__ 在這里

[英]Python Error: AttributeError: __enter__ Here

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__

嘗試更新您的庫,它似乎是版本沖突

pip install -U pillow

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM