Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot install CUDA Toolkit 9.1.85 on Windows 7 64 bit

I am trying to install CUDA Toolkit 9.1.85 on my machine. With the first attempt, all seems working until I tried to compile OpenCV 3.4.1 with CUDA support on Visual Studio 2017 15.6.6. I checked on the internet and I found a lot info about the error. On the second attempt, I followed what suggested here and here, but I cannot successfully install CUDA.

Launching CUDA installation with the following command:

setup.exe -log:"D:\logcuda" -loglevel:6

And looking into the log file, I find that

ERROR: [NVI2.NVInstaller] 2064@CNVInstaller::InternalPerformInstall : Package "visual_studio_integration_9.1" failed with error: Exception {0x80004005 - Unspecified error.; File: PerformInstall.cpp; Line: 4029; Phase failure}. 

If I try to install CUDA without Visual Studio Integration, I can successfully install CUDA (not tried to compile OpenCV).

Before the second attempt, I removed all NVIDIA components (driver and so on), used DDU, removed Visual Studio with all components (launched also InstallCleanup.exe), run CCleaner.

Now I am with Visual Studio 2017 15.4.5 and only VC++ 2015.3 140 (141 is not installed), NVIDIA 397.31, but still getting the same error. With the first attempt, I install successfully CUDA with Visual Studio 2017 15.6.6 VC++ 2017 v141 with Visual Studio Integration.

Can someone point me in the right way? I cannot figure out fix it. Thanks for your answer.

like image 380
lezan Avatar asked Oct 16 '22 19:10

lezan


1 Answers

Following this suggestion , here's how I installed CUDA 9.2 for Visual Studio 2017 15.6.7:

  1. Current Visual Studio 2017 version is 15.7.3, so I had to download an earlier version from here.
  2. Unzip CUDA installer like an archive into a directory, say C:\cuda_9.2.88_win10\
  3. Install CUDA without Visual Studio Integration (you need to choose Custom instead of Express installation)
  4. Copy C:\cuda_9.2.88_win10\CUDAVisualStudioIntegration\extras\visual_studio_integration\MSBuildExtensions to C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\BuildCustomizations .
  5. Copy C:\cuda_9.2.88_win10\CUDAVisualStudioIntegration\extras\visual_studio_integration\CudaProjectVsWizards to C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\Extensions\CUDA
  6. Run as administrator: devenv /setup from directory C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE
  7. Install all the .msi from C:\cuda_9.2.88_win10\CUDAVisualStudioIntegration
like image 71
Serge Rogatch Avatar answered Oct 30 '22 01:10

Serge Rogatch