WSL2(Ubuntu20.04)RuntimeError: NVCC returned an error, cuda/std/complex: No such file or directory

I try to implement the model of styleclip(global direction).
But if I run the code, the error occurs.
And I have no idea that how to fix it.

I have already try to check whether the install of cuda has something wrong.
But it seems normally.

I ran into this issue on google colab… I searched for the file “complex”

!find / -name complex

and found it located in


I then added another include path for it in the nvcc compile cli in the file


cmd += ' --include-path "%s"' % os.path.join('/usr/local/lib/python3.8/site-packages/nvidia/dali', 'include')

I was then able to complete the compile of “”

I did alot of searching trying to resolve this issue and found no solutions anywhere… I hope this helps someone else encountering this problem or a similar one.

I was running on ubuntu 18.04 python 3.8 with the nvidia-tensorflow installed as follows:

!pip install nvidia-pyindex
!pip install nvidia-tensorflow[horovod]
!pip install nvidia-tensorboard==1.15
!conda install -c conda-forge openmpi