Pytorch Torch_Sparse Installation Without Cuda
I Am New in Pytorch and I Have Faced One Issue, Namely I Cannot Get My Torch_Sparse Module Properly Installed. in General, I Wanted to Use Module...
I am new in PyTorch and I have faced one issue, namely I cannot get my torch_sparse module properly installed.
In general, I wanted to use module torch_geometric - this I have installed. However, when during the execution of the program I keep receiving the error ModuleNotFoundError: No module named ‘torch_sparse’ .
I try to intall it, but when I use the command pip install torch-sparse in anaconda, I get an error:
UserWarning: CUDA initialization:Found no NVIDIA driver on your system.
My system does not have a CUDA. So how could I install torch_sparse module without it?
Thank you in advance!
Kind regards
Rostyslav
2 Answers
As outlined in in pytorch_geometric installation instructions you have to install dependencies first and torch_geometric after that.
For PyTorch 1.7.0 and CPU:
pip install --no-index torch-scatter -f
pip install --no-index torch-sparse -f
pip install --no-index torch-cluster -f
pip install --no-index torch-spline-conv -f
pip install torch-geometric
Please notice torch-1.7.0+cpu at the very end of each page
I have found the use of conda instead of pip very useful. Running the following three commands turned out to be smooth and without errors:
- conda install -c pyg pytorch-sparse
- conda install -c pyg pytorch-scatter
- conda install -c pyg pyg
As far as I understood from the torch-geometric docs,we should be fine with these commands on CUDA/CPU.