huggingface / huggingface/pytorch_block_sparse
OSError: CUDA_HOME environment variable is not set
- Dominant language
- C++
- Stars
- 551
- Forks
- 34
- PR merge metrics
- No merged PRs in 30d
Description
Hi
I tried to install the package using the following command but I got OSError.
```shell
python -m pip install pytorch_block_sparse
```
The error is the following:
```shell
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 "", line 1, in
File "C:\Users\osain\AppData\Local\Temp\pip-install-i8p45fhk\pytorch-block-sparse\setup.py", line 33, in
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?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.