How to install PyTorch WITHOUT CUDA

I have a remote machine which used to have GPUs and still has part of the drivers/libs but overall is out of date in that respect. I would like to treat it as a CPU-only server and install the according version of pytorch. However when I execute

conda install pytorch torchvision torchaudio cpuonly -c pytorch

and run the script it tells me that

Collecting environment information...
/home/tyszkiew/.local/lib/python3.8/site-packages/torch/cuda/ UserWarning: CUDA initialization: The NVIDIA driver on your system is too old (found version 9010). Please update your GPU driver by downloading and installing a new version from the URL: Alternatively, go to: to install a PyTorch version that has been compiled with your version of the CUDA driver. (Triggered internally at  /pytorch/c10/cuda/CUDAFunctions.cpp:100.)
  return torch._C._cuda_getDeviceCount() > 0
PyTorch version: 1.7.0
Is debug build: Yes
CUDA used to build PyTorch: 10.2

OS: Ubuntu 18.04 LTS
GCC version: (Ubuntu 7.3.0-16ubuntu3) 7.3.0
Clang version: 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
CMake version: version 3.10.2

Python version: 3.8 (64-bit runtime)
Is CUDA available: No
CUDA runtime version: 9.0.176
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect

Is this normal? The reason it matters to me is that I want to install torch_geometric (the cpu-only version) but it fails with

OSError: /cvlabdata2/home/tyszkiew/miniconda3/envs/py38/lib/python3.8/site-packages/torch_sparse/ undefined symbol: _ZN3c105ErrorC1ENS_14SourceLocationERKSs

and I am wondering if that could be caused by torch_geometric thinking that it has access to CUDA and reaching for CUDA-specific symbols where in fact it is not available. I have also tried installing the cu102 version of torch_geometric but it fails on import trying to search for The point of my question is to figure out whether the issue is on the side of torch_geometric or PyTorch. Thanks.


I think this is fine. You can use CUDA_VISIBLE_DEVICES=-1 to hide all the GPUs from the cuda driver (and so from pytorch as well).

For the symbol error, it looks like it is an issue with torch_sparse no?