ImportError usrlocallibpython38dist-packagestorchliblibtorch_cudaso undefined symbol cudaGraphDebugDotPrint version libcudartso110
This error typically occurs when there is a mismatch between the versions of CUDA used to build PyTorch and the CUDA version installed on your system.
To resolve this issue, you can try the following steps:
-
Make sure you have the correct version of CUDA installed on your system. You can check the version by running the following command:
nvcc --versionIf the CUDA version doesn't match the one required by PyTorch, you may need to install the correct version.
-
If you have multiple versions of CUDA installed, make sure that the correct version is being used by PyTorch. You can set the
CUDA_HOMEenvironment variable to the path of the correct CUDA installation. For example, if CUDA is installed in/usr/local/cuda-11.0, you can run:export CUDA_HOME=/usr/local/cuda-11.0 -
If you have recently upgraded CUDA or PyTorch, try reinstalling PyTorch to ensure that it is built against the correct CUDA version. You can uninstall PyTorch using
pipand then reinstall it using the appropriate command for your system. For example, if you want to install PyTorch with CUDA 11.0 support, you can run:pip uninstall torch pip install torch==1.9.0+cu110 -f https://download.pytorch.org/whl/torch_stable.htmlMake sure to replace
1.9.0+cu110with the version of PyTorch that you want to install. -
If none of the above steps work, you may need to rebuild PyTorch from source using the correct CUDA version. Refer to the PyTorch documentation for instructions on how to build from source.
By following these steps, you should be able to resolve the ImportError related to cudaGraphDebugDotPrint and libcudart.so.11.0
原文地址: https://www.cveoy.top/t/topic/icw6 著作权归作者所有。请勿转载和采集!