With environment torch==1.8.1 CUDA 10.1 failed the installation.
After update CUDA to 11.1 successfully installed.
So for those who got problems with installation especially nvcc error, maybe update the cuda version is a good choice, after all you got to update it at some time.
Plus, when downloading cuda, always choose runfile instead of deb, it's easier and more convenient and less problems.
With environment torch==1.8.1 CUDA 10.1 failed the installation. After update CUDA to 11.1 successfully installed. So for those who got problems with installation especially nvcc error, maybe update the cuda version is a good choice, after all you got to update it at some time. Plus, when downloading cuda, always choose runfile instead of deb, it's easier and more convenient and less problems.