Pytorch uninstall and reinstall (CUDA problem)

Hi.
I’ve been willing to use the GPU of my nvidia GeForce GTX 1050 on Linux for a will now.
But I never managed to install the CUDA and drivers properly.
I’m on Linux Mint 20 Ulyana.

I had CUDA 11.1 installed and launched the

conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch -c nvidia

And realized a little too late that it was launching another installation of CUDA over my first install. At this point I started thinking it was not good…

result : the torch.cuda.is_available() was false

So I tried to uninstall all CUDA and PyTorch.

I seems that the uninstall only works partially, reinstalling ends very quickly compared to the first install.

and torch.cuda.is_available() is now false every times.

How can I completely uninstall everything ?
Which NVIDIA driver is recommended with the CUDA 11.1 version of PyTorch ?

Thank you for your time.

Is your GPU visible (e.g., with nvidia-smi)? I have not used Linux Mint myself, but if it is based on Ubuntu you can try one of the installers here.

Hi eqy, thanx for the answer.

No I made some sudo apt-get purge *nvidia*
and some apt-get remove *nividia*
there doesn’t seem to be any nvidia programs installed anymore.

for your suggestion : yes I used these installer at first (the CUDA 11.1.1).
The problem is that the command line
conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch -c nvidia
re-installed another version of CUDA over my first one (something like CUDA 11.1.75 if I read correctly ).
And it seems that at some point it broke something.

Now I want to uninstall everything, to try again.
until i succeed.

I tried the commands at this page:
https://stackoverflow.com/questions/43664444/how-can-l-uninstall-pytorch

And now the uninstall command says PyTorch is uninstalled. But I can still make a import torch in my python3 environment.

And reinstall with the PyTorch command above is very short and doesn’t seem to go through the whole process again.

Anyway thank you for your time, i will try to get it done.

1 Like

Hi I have some news:
I Made a “system backup saving” a few days ago with Timeshift application on Linux Mint.
(when my CUDA 11.1 installation was successful)
Just restored that backup this morning

>>> import torch
>>> torch.cuda.is_available()
True

everything works fine for me now !

have a wonderful day.

1 Like