CSAILVision / gandissect

Pytorch-based tools for visualizing and understanding the neurons of a GAN. https://gandissect.csail.mit.edu/
MIT License
1.77k stars 283 forks source link

OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root. #19

Open miss1997yuan opened 4 years ago

miss1997yuan commented 4 years ago

when i create the envs and run the script as mentioned, i always meet the problem like the title , i have googled the problem with no satisfied answer, would you mind giving me some suggestions ?

davidbau commented 4 years ago

The env sets up CUDA_HOME, because pytorch uses that to find the nvcc compiler (which isn't included with conda's installation of cuda, but which is included in nvidia's standard cuda toolkits). See the following lines

https://github.com/CSAILVision/gandissect/blob/master/script/setup_env.sh#L71-L72

But the choice of CUDA_HOME might be the wrong choice for your system - you can try editing the same file that is created by that line to change it to point to the parent directory that contains your installation of nvcc on your system.

On Mon, Oct 19, 2020 at 10:13 PM zhiyuan notifications@github.com wrote:

when i create the envs and run the script as mentioned, i always meet the problem like the title , i have googled the problem with no satisfied answer, would you mind giving me some suggestions ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/CSAILVision/gandissect/issues/19, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2MN2D27V62CW2NQ7FVCGDSLTW4FANCNFSM4SXIKOPQ .

miss1997yuan commented 4 years ago

thanks ,i find the problem may be because of the version of CUDA, when i choose the proper cuda version , the problem is solved

Henry-Xing commented 3 years ago

Is this only for linux? My system is Win, and I input torch.cuda.is_available() in anaconda then I got true. But I still have this trouble.