I highly doubt this. A GTX 1050 has a compute capability of 6.1 meaning that it should work with all recent CUDA versions.
First update your drivers 1, then install CUDA 10.2 1, and then install the correct PyTorch version. You may need to restart your PC in between these steps.