CUDA 9.01 installation Failed on GTX 1050 Nvidia

I need to run tensorflow-gpu on windows 10. so need to install CUDA 9.0.

I already installed Visual studio 2017 community version. But still cant install CUDA 9.0.

See this post for a link to various threads on possible ways to resolve issues of CUDA installations failing:

https://devtalk.nvidia.com/default/topic/1037027/cuda-setup-and-installation/cuda-installation-failed-on-1050ti/post/5268413/#5268413