3

I'm trying to run StyleGan2 by Nvidia. I have created a new enviroment, I failed this check mandated in the readme file provided.

enter image description here

In particular, when I run it, I get the error you see in the title of the question. I looked it up, and the solution ostensibly is to add this path to env vars

C:\Program Files\Microsoft Visual Studio 10.0\VC\bin

I'm trying to do that, but I don't have bin in my VC folder! I only have include and lib, brand new installation of visual studio.

talonmies
  • 70,661
  • 34
  • 192
  • 269
Alex
  • 599
  • 1
  • 5
  • 14

2 Answers2

7

Thanks to @talonmies, the solution is as follows: Firstly, c++ package doesn't come by default with a clean new installation of VS, you need to select the package. Secondly, it seems that now the path for cl.exe is here

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\bin\Hostx64\x64
Alex
  • 599
  • 1
  • 5
  • 14
0

In my case the full error message was:

nvcc fatal : Cannot find compiler 'cl.exe' in PATH

...

No CMAKE_CUDA_COMPILER could be found.

Tell CMake where to find the compiler by setting either the environment variable "CUDACXX" or the CMake cache entry CMAKE_CUDA_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.

So I had to do:

export CUDACXX="/mnt/c/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.31.31103/bin/Hostx64/x64/cl.exe"

and it worked.

Redoman
  • 3,059
  • 3
  • 34
  • 62