Installing Pytorch CUDA on Manjaro

I’m failing to install pytorch with cuda support on a clean Manjaro install. (Lysia, 20.0.3: kernel is 5.6.15-1-MANJARO)
The GPU is a GTX1080ti, CUDA is 10.2.89, and I have tried two ways of installing torch. The first was, as the documentation specifies: pip install --user torch torchvision. I got this through selecting [Stable, linux, pip, python, cuda 10.2] on the “getting started” guide. I included the --user flag, since installing python packages as root is discouraged on the Archwiki.

The other method I tried was with pacman, installing the python-pytorch-cuda package.
On both cases, the result of the torch.cuda.is_available() function call is False.

I’ve installed cuda-10.2.89-5 through pacman, with the opencl nvidia-340xx drivers. Could this be a problem?
I’ve read this post saying that any distro is fine for pytorch, and the “Getting started” guide lists Arch as the first linux on the list to use pytorch.

I have found no information concerning this problem at all, that’s why I’m writing here. The fact that I haven’t found any post on this makes me think that my setup is wrong, and this is not a bug, but I don’t know where else to look. Would anyone happen to have a solution to this? or maybe a suggestion into what I should be looking at?
nvtop shows the gpu working well.
Here’s the output of nvcc --version:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_19:24:38_PDT_2019
Cuda compilation tools, release 10.2, V10.2.89

This is the output of torch.cuda.current_device()

The NVIDIA driver on your system is too old (found version 10010).
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.

This error was reported for cuda 9.0, but it was closed, and I’m using 10.2.


For CUDA10.2.89, you would need a driver >=440.33 as given in this table.
Could you try to update the driver and reinstall PyTorch?

1 Like

It worked! I had to uninstall all video drivers, cuda-dependent packages, and reinstall the video-nvidia-440xx package. I did so with Manjaro’s auto-install tool:

I think the problem was installing the opencl-nvidia package. This installs the 430xx nvidia drivers by default. I don’t remember when I did this, but it had to do with nvidia-docker, for one of my last projects.

Thanks for the tip!

1 Like