UserWarning: Failed to load image Python extension: dlopen(/Users/anderson/Library/Caches/pypoetry/virtualenvs/redacted-cMHZGf73-py3.9/lib/python3.9/site-packages/torchvision/image.so, 0x0006): Library not loaded: @rpath/libpng16.16.dylib
Referenced from: /Users/anderson/Library/Caches/pypoetry/virtualenvs/redacted-cMHZGf73-py3.9/lib/python3.9/site-packages/torchvision/image.so
Reason: tried: '/Users/malfet/miniforge3/envs/py_39_torch-1.10.2/lib/libpng16.16.dylib' (no such file), '/Users/malfet/miniforge3/envs/py_39_torch-1.10.2/lib/libpng16.16.dylib' (no such file), '/Users/malfet/miniforge3/envs/py_39_torch-1.10.2/lib/libpng16.16.dylib' (no such file), '/Users/malfet/miniforge3/envs/py_39_torch-1.10.2/lib/libpng16.16.dylib' (no such file), '/usr/local/lib/libpng16.16.dylib' (no such file), '/usr/lib/libpng16.16.dylib' (no such file)
warn(f"Failed to load image Python extension: {e}")
Seems like the file is not being included in torchvision-0.11.3-cp39-cp39-macosx_11_0_arm64.whl and we are not pointing to the right location anyway. I don’t have miniforge installed or a malfet user.
Hi Andersen!
I have 100% similar warning on MBP 14 m1 pro.
User/malfet/miniforge3/…
Do you know how to fix this warn? Internet doesn’t know same problems and I don’t know how to fix it.
I encountered the same problem and fixed it by going to the directory that is shown in the error. It opens up a .txt file and you just need to change the extension name of “image.py”. In my case, I had to change it to “image.jpg” since i am using jpg files for my code. Try it! hope it will help.
I’m getting this in a ubuntu docker image with 1.11, “pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113”