本文介绍了无法在Windows 7 64位上安装CUDA Toolkit 9.1.85的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在计算机上安装CUDA Toolkit 9.1.85。第一次尝试,一切似乎都可行,直到我尝试在Visual Studio 2017 15.6.6上编译具有CUDA支持的OpenCV 3.4.1。我检查了互联网,发现很多。在第二次尝试中,我遵循了以下建议和,但我无法成功安装CUDA。

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.

使用以下命令启动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}.

如果我尝试在没有Visual Studio Integration的情况下安装CUDA,则可以成功安装CUDA(未尝试进行编译)

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

在第二次尝试之前,我删除了所有NVIDIA组件(驱动程序等),使用了DDU,删除了Visual Studio的所有组件(还启动了InstallCleanup.exe) ),运行CCleaner。

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.

现在,我使用的是Visual Studio 2017 15.4.5,仅使用VC ++ 2015.3 140(未安装141),NVIDIA 397.31,但仍然遇到相同的错误。第一次尝试,我成功安装了带有Visual Studio集成的Visual Studio 2017 15.6.6 VC ++ 2017 v141 CUDA。

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.

推荐答案

在,这是我为Visual Studio 2017 15.6.7安装CUDA 9.2的方式:

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


  1. 当前的Visual Studio 2017版本为15.7.3,因此我必须。

  2. 将CUDA安装程序像归档文件一样解压缩到目录中,例如 C:\cuda_9.2.88_win10\

  3. 不使用Visual Studio集成安装CUDA(您需要选择自定义而不是Express安装)

  4. 复制 C:\ \cuda_9.2.88_win10\CUDAVisualStudioIntegration\extras\visual_studio_integration\MSBuildExtensions
    C:\程序文件(x86)\Microsoft Visual Studio\2017\社区\Common7\IDE\VC\VCTargets\BuildCustomizations

  5. 复制 C:\cuda_9.2.88_win10\CUDAVisualStudioIntegration\extras\visual_studio_integration\CudaProjectVsWizards

    C:\程序文件(x86)\Microsoft Visual Studio\2017\社区\Common7\IDE\扩展名\CUDA

  6. 以管理员身份运行: devenv / setup 从目录 C:\Program Files(x86)\Microsoft Visual Studio\2017\Community\Common7\IDE

  7. C:\cuda_9安装所有.msi。 2.88_win10\CUDAVisualStudioIntegration

  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 toC:\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\CudaProjectVsWizardstoC:\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

这篇关于无法在Windows 7 64位上安装CUDA Toolkit 9.1.85的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 19:23