Pytorch failed after opencv installation

I have the same problem.

  1. conda install pytorch torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia
  2. python → torch.cuda.is_available() → True
  3. conda install opencv
  4. python → torch.cuda.is_available() → False