Import torch fails - duplicate CUDA device?

Pytorch keeps failing. Error message below when I run “import torch”

import torch
[F …\c10\core\CopyBytes.cpp:24] Check failed: g_copy_bytes[0][from][to] == nullptr && g_copy_bytes[1][from][to] == nullptr Duplicate registration for device type pair CUDA, CUDA

I have the following installed on top of Python 3.8.5

torch 1.8.1+cu111
torchaudio 0.8.1
torchvision 0.9.1+cu102

I note that Torchvision does not seem to be compatible with CUDA 11.1. There is not another verson of torchvision available. Suggestions?

Note that after this error, the python interpreter crashes.

Running on windows 10 under Anaconda
Thanks
Francis

Hello bro. Have you fixed that? I am currently encountering that issue also.

Same problem here, have no idea what to do

PyTorch 1.8.1 is quite old and not supported anymore, so could you update to the latest stable or nightly release and post a minimal, executable code snippet to reproduce the issue in case it still fails?