Closed zzd1992 closed 4 years ago
That's odd. Maybe you have an unusual install location for CUDA. Either way, just setting CUDA_HOME
to your cuda install path before running python setup.py
should work: CUDA_HOME=/path/to/your/cuda/home python setup.py install
Thanks. My problem is solved.
@zzd1992 Could you tell how to solve the problem about "the CUDA_HOME environment variable is not set"?
@DaLei001
CUDA_HOME=/path/to/your/cuda/home python setup.py install
This is worked in my situation.
I am getting this error in a conda env on a server and I have cudatoolkit installed on the conda env. What should the CUDA_HOME be in my case.
@mmahdavian cudatoolkit probably won't work for you, it doesn't provide access to low level c++ apis. You'd need to install CUDA using the official method.
I got a similar error when using pycharm, with unusual cuda install location.
I just add the CUDA_HOME
env and solve this problem.
The problem could be solved by installing the whole cuda through the nvida website. and when installing it, you may come across some problem. then https://askubuntu.com/questions/1280205/problem-while-installing-cuda-toolkit-in-ubuntu-18-04/1315116#1315116?newreg=ec85792ef03b446297a665e21fff5735 the answer may be to help you. GOOD LUCK
I work on ubuntu16.04, cuda9.0 and Pytorch1.0. When I run your example code
cuda/setup.py
:However, I am sure cuda9.0 in my computer is installed correctly. How to fix this problem?