You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I tried to create a new conda environment torch + torchvision + torchaudio + blas accelerate on a MacOS 14.
Post installation, when I try to import the torchvision library, I get a warning about missing libjpeg9.
I have added more details below. Just wanted to bring this to your attention for triage and if there is an issue to be fixed. Cheers!
(Replaced full path with CONDA_PREFIX and added newlines to make it clearer)
mamba create -n env -c pytorch 'pytorch=2.5.1' torchvision torchaudio 'libblas=*=*accelerate'
mamba run -n env python
Python 3.12.8 | packaged by conda-forge | (main, Dec 5 2024, 14:19:53) [Clang 18.1.8 ] on darwin
Type "help", "copyright", "credits" or "license"for more information.
>>> import torchvision
{CONDA_PREFIX}/lib/python3.12/site-packages/torchvision/io/image.py:14: UserWarning: Failed to load image Python extension: 'dlopen({CONDA_PREFIX}/lib/python3.12/site-packages/torchvision/image.so, 0x0006): Library not loaded: @rpath/libjpeg.9.dylib Referenced from: <367D4265-B20F-34BD-94EB-4F3EE47C385B>{CONDA_PREFIX}/lib/python3.12/site-packages/torchvision/image.so Reason: tried: '{CONDA_PREFIX}/lib/python3.12/site-packages/torchvision/../../../libjpeg.9.dylib' (no such file),'{CONDA_PREFIX}/lib/python3.12/site-packages/torchvision/../../../libjpeg.9.dylib' (no such file), '{CONDA_PREFIX}/lib/python3.12/lib-dynload/../../libjpeg.9.dylib' (no such file), '{CONDA_PREFIX}/bin/../lib/libjpeg.9.dylib' (no such file)'
If you don't plan on using image functionality from `torchvision.io`, you can ignore this warning. Otherwise, there might be something wrong with your environment. Did you have `libjpeg` or `libpng` installed before building `torchvision` from source? warn(>>>
I tried to find the jpeg libraries in the conda environment with find command
When I run otool, I see that it is linked against jpeg9, while installing libjpeg-turbo as a dependency, which only provides jpeg8.
$ otool -L $CONDA_PREFIX/lib/python3.1/site-packages/torchvision/image.so
{CONDA_PREFIX}/lib/python3.1/site-packages/torchvision/image.so:
@rpath/libpng16.16.dylib (compatibility version 56.0.0, current version 56.0.0)
@rpath/libjpeg.9.dylib (compatibility version 15.0.0, current version 15.0.0)
@rpath/libwebp.7.dylib (compatibility version 9.0.0, current version 9.8.0)
@rpath/libc10.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libtorch.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libtorch_cpu.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libtorch_python.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libc++.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1345.100.2)
Collecting environment information...
PyTorch version: 2.5.1
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A
OS: macOS 14.7.2 (arm64)
GCC version: Could not collect
Clang version: 16.0.0 (clang-1600.0.26.6)
CMake version: Could not collect
Libc version: N/A
Python version: 3.12.8 | packaged by conda-forge | (main, Dec 5 2024, 14:19:53) [Clang 18.1.8 ] (64-bit runtime)
Python platform: macOS-14.7.2-arm64-arm-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
CPU:
Apple M3 Max
Versions of relevant libraries:
[pip3] numpy==2.2.2
[pip3] torch==2.5.1
[pip3] torchaudio==2.5.1
[pip3] torchvision==0.20.1
[conda] numpy 2.2.2 py312h7c1f314_0 conda-forge
[conda] pytorch 2.5.1 py3.12_0 pytorch
[conda] torchaudio 2.5.1 py312_cpu pytorch
[conda] torchvision 0.20.1 py312_cpu pytorch
The text was updated successfully, but these errors were encountered:
IMG-PRCSNG
changed the title
Torchvision 2.5 links to jpeg9 on MacOS, while depending on libjpeg-turbo which only provides jpeg8
Torchvision 0.20.1 looks for jpeg9 on MacOS, while depending on libjpeg-turbo which only provides jpeg8
Jan 30, 2025
🐛 Describe the bug
Hi, I tried to create a new conda environment torch + torchvision + torchaudio + blas accelerate on a MacOS 14.
Post installation, when I try to import the torchvision library, I get a warning about missing libjpeg9.
I have added more details below. Just wanted to bring this to your attention for triage and if there is an issue to be fixed. Cheers!
(Replaced full path with CONDA_PREFIX and added newlines to make it clearer)
I tried to find the jpeg libraries in the conda environment with find command
When I run
otool
, I see that it is linked against jpeg9, while installing libjpeg-turbo as a dependency, which only provides jpeg8.conda packages
Versions
The text was updated successfully, but these errors were encountered: