pytorch_block_sparse
pytorch_block_sparse copied to clipboard
OSError: CUDA_HOME environment variable is not set
Hi
I tried to install the package using the following command but I got OSError.
python -m pip install pytorch_block_sparse
The error is the following:
Collecting pytorch_block_sparse
Using cached pytorch_block_sparse-0.1.2.tar.gz (82 kB)
ERROR: Command errored out with exit status 1:
command: 'C:\Users\osain\Anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\osain\\AppData\\Local\\Temp\\pip-install-i8p45fhk\\pytorch-block-sparse\\setup.py'"'"'; __file__='"'"'C:\\Users\\osain\\AppData\\Local\\Temp\\pip-install-i8p45fhk\\pytorch-block-sparse\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\osain\AppData\Local\Temp\pip-pip-egg-info-_3vgf_fn'
cwd: C:\Users\osain\AppData\Local\Temp\pip-install-i8p45fhk\pytorch-block-sparse\
Complete output (11 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\osain\AppData\Local\Temp\pip-install-i8p45fhk\pytorch-block-sparse\setup.py", line 33, in <module>
extra_compile_args=['-I', '%s/pytorch_block_sparse' % rootdir]
File "C:\Users\osain\Anaconda3\lib\site-packages\torch\utils\cpp_extension.py", line 705, in CUDAExtension
library_dirs += library_paths(cuda=True)
File "C:\Users\osain\Anaconda3\lib\site-packages\torch\utils\cpp_extension.py", line 802, in library_paths
paths.append(_join_cuda_home(lib_dir))
File "C:\Users\osain\Anaconda3\lib\site-packages\torch\utils\cpp_extension.py", line 1652, in _join_cuda_home
raise EnvironmentError('CUDA_HOME environment variable is not set. '
OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Enviroment:
- OS: Windows 10
- Python version: 3.7.3
- CUDA version: 10.1
I think it could happen because I installed pytorch with CUDA using conda. Do I need to set up CUDA_HOME environment variable manually? Where could I find the instalation?
Same problem in Ubuntu 18.04
OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Same problem in Ubuntu 18.04
OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root. ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Do you have installed PyTorch+CUDA via conda? I think that could be the reason.
Same problem in Ubuntu 18.04
OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root. ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.Do you have installed PyTorch+CUDA via conda? I think that could be the reason.
Yes, is there a solution for Conda?
I have same problem as reported above, for both Windows and Linux.
Maybe try export CUDA_HOME=/usr/local/cuda-10.1/?
Maybe try export CUDA_HOME=/usr/local/cuda-10.1/?
That should work, but the problem comes when installing cuda with conda and not being able to find the installation path.
i have the same quesion and i use win10 like you,not linux system, so finally have you solved it?