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

Hi all,
I am new to CUDA, I’ve found it today.

I am trying to implement your KNN_Mono algorithm because the OpenCV FastNlMeanDenoising is way too slow.

I did the following:

  • Install Nvidia CUDA
  • Open VisualStudio Code with Anaconda3 and then “pip install PyCuda”

I downloaded an example from https://github.com/AlainPaillou/PyCuda_Denoise_Filters that have an implementation of your algorithm in python.

I started the py program running “python cudatest.py” (cudatest.py is my python file)
Now I get this error:
[command: nvcc --cubin -arch sm_61 -m64 -Ic:\users\XXXXXXX\anaconda3\lib\site-packages\pycuda\cuda kernel.cu]
nvcc fatal : Cannot find compiler ‘cl.exe’ in PATH

I tried to add to the ‘Environment Variables’ settings the PATH where cl.exe is but that’s not working (I made a StackOverflow post there with images https://stackoverflow.com/questions/59735926/cannot-find-compiler-cl-exe-in-path-visualstudio)

This is my version:
PS C:\Users\XXXXXXX\Desktop\XXXXXXX\Py Script> nvcc --version
nvcc: NVIDIA ® Cuda compiler driver
Copyright © 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_19:32:27_Pacific_Daylight_Time_2019
Cuda compilation tools, release 10.2, V10.2.89

Do you have any suggestions? I am struggling for hours.

Visual Studio Code is not currently an officially supported development environment for CUDA on windows.

The supported environments are listed in the CUDA windows install guide.

However, people have evidently found ways to make it work:


1 Like

guilio: you do know that VS Code is not a compiler, right? cl.exe is a compiler program. You need to have a compiler installed to build executable modules.

Thanks Robert Ill try tomorrow.

1 Like

Yes i know it. Anyway it should launch the compiler once read mod() function infact it said that doesnt find any cl.exe into the windows environment variables PATH.
Ill try robert solution.

Nice to see you referred my blog here. I almost forgot about the site, but I think I should keep updating the blog site with new information.