mac 使用 torchvision 的時候,會警告 image.so \ libc10.dylib

ponponon發表於2023-04-25
/Users/ponponon/.local/share/virtualenvs/image_vector-8oWws01B/lib/python3.10/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: dlopen(/Users/ponponon/.local/share/virtualenvs/image_vector-8oWws01B/lib/python3.10/site-packages/torchvision/image.so, 0x0006): Symbol not found: __ZN3c106detail19maybe_wrap_dim_slowExxb
  Referenced from: <0B637046-A38B-3A5C-80C6-E847C27DCCD5> /Users/ponponon/.local/share/virtualenvs/image_vector-8oWws01B/lib/python3.10/site-packages/torchvision/image.so
  Expected in:     <3F9923D2-81A5-3EC8-9739-EC0C1C816132> /Users/ponponon/.local/share/virtualenvs/image_vector-8oWws01B/lib/python3.10/site-packages/torch/lib/libc10.dylib
  warn(f"Failed to load image Python extension: {e}")

macbook pro Apple Silicon M1 使用 torchvision 的時候,會報錯 Symbol not found \ image.so \ libc10.dylib

原因,可能是低版本的 torchvision 和 macbook pro Apple Silicon M1 的相容性問題

升級 torchvision 就好了

我這裡原來的 torchvision 的版本是 0.14.1

升級後的 torchvision 的版本是 0.15.1

就沒有警告了

相關文章