First of all, thank you very much for your help. Let me explain my Settings. Cuda version is 11.1, driver version is 456.38, the version number can be displayed when running nvidia-smi and nvcc-V. Print (torch 1.8.1+cu111-cp38-cp38-win_amd64); There is no error when running the import Torch, but yolov5 still displays: "AssertionError: CUDA unavailable, invalid device 0 requested ", now I re-create a virtual environment in Conda, I am worried that it may be because the previous version is too high. The torch version now installed is Torch 1.10.0+ cu102-cp38-win_amd64 .Now you may need to reinstall your system or environment because you didn’t install it yourself.The above is my situation, thank you again for your help, I wonder if I have a clear description of my situation.