I was just training a model and this warning popped, I’ve never seen it before. I don’t know if it’s code related.
my_project\venv\lib\site-packages\torchvision\io\image.py:11: UserWarning: Failed to load image Python extension: Could not find module 'my_project\venv\Lib\site-packages\torchvision\image.pyd' (or one of its dependencies). Try using the full path with constructor syntax.
warn(f"Failed to load image Python extension: {e}")
Is it something I should worry about? How can I fix it?
I was trying to find the problem doing some tests and I removed all torchvision references leaving only the import and it still appears. So I don’t think it’s code related.
EDIT: using python 3.9.9 installed via pyenv
EDIT2: downgrading to torchvision 0.10.0 didnt help
EDIT3: installing from python.org instead of brew/pyenv doesnt fix it either
This issue might be MAC-specific, as I couldn’t reproduce it on Linux and don’t have a MAC to test it, so feel free to create an issue on GitHub so that we could try to reproduce it.
I also have the same problem. I got the following warning when I import torchvision
C:\ProgramData\Anaconda3\envs\torch1.10.1\lib\site-packages\torchvision\io\image.py:11: UserWarning: Failed to load image Python extension: Could not find module 'C:\ProgramData\Anaconda3\envs\torch1.10.1\Lib\site-packages\torchvision\image.pyd' (or one of its dependencies). Try using the full path with constructor syntax.
warn(f"Failed to load image Python extension: {e}")
My system is Windows 10 with CUDA 10.2. Pytorch 1.10.1 was install in a conda environment with python 3.8 using the following command (from pytorch website)
I followed suggestion by Maxim to resolve the issue!
I downgraded from pytorch-1.10.2 and torchvision-0.11.3 to pytorch-1.9.0 and torchvision-0.10.0
to resolve the error. Also, I am using pip in anaconda and the current pip dependency resolver doesn’t account for all the packages installed. I had to manually downgrade torchaudio to version 0.9.0 to avoid issues with it. pip install --upgrade torch==1.9.0 pip install --upgrade torchvision==0.10.0 pip install --upgrade torchaudio==0.9.0
I had exactly the same specs as you. I solved this issue by creating a new environment in Anaconda and installing the following versions
conda install pytorch==1.4.0 torchvision==0.5.0 cudatoolkit=10.1 -c pytorch