question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Different CUDA versions than PyTorch

See original GitHub issue

I’m trying to run PyTorch Geometric in google colab, and I installed all needed libraries using:

!pip install --upgrade torch-scatter
!pip install --upgrade torch-sparse
!pip install --upgrade torch-cluster
!pip install --upgrade torch-spline-conv 
!pip install torch-geometric

but I got this error:

RuntimeError: Detected that PyTorch and torch_sparse were compiled with different CUDA versions. PyTorch has CUDA version 10.1 and torch_sparse has CUDA version 10.0. Please reinstall the torch_sparse that matches your PyTorch install.

I tried to search and I found this suggested solution, but it didn’t work for me:

!pip install torch-scatter==latest+cu101 torch-sparse==latest+cu101 -f https://s3.eu-central-1.amazonaws.com/pytorch-geometric.com/whl/torch-1.4.0.html

Any help, please!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:23 (7 by maintainers)

github_iconTop GitHub Comments

9reactions
rusty1scommented, Mar 22, 2020

Can you try to first upgrade pip and then run:

pip install torch-scatter==latest+cu101 torch-sparse==latest+cu101 -f https://pytorch-geometric.com/whl/torch-1.4.0.html
5reactions
samihaijacommented, Jan 26, 2021

Neither of the work-around commands work nowadays 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

Different CUDA versions than PyTorch · Issue #189 - GitHub
I'm trying to run PyTorch Geometric, and I installed all needed libraries using: !pip3 install ... Different CUDA versions than PyTorch #189.
Read more >
Difference between versions 9.2,10.1,10.2,11.0 of cuda for ...
PyTorch doesn't use the system's CUDA installation when installed from a package manager (either conda or pip).
Read more >
PyTorch and torch_sparse were compiled with different CUDA ...
PyTorch and torch_sparse were compiled with different CUDA versions ... Hi. I want to run a python program but there is an error...
Read more >
Pytorch uses wrong cuda version - vision
Hello everybody, PyTorch seems to use the wrong cuda version. Afterwards if I start python in this environment and import torch, torch. version...
Read more >
Previous PyTorch Versions
CUDA 10.2 conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=10.2 -c pytorch # CUDA 11.3 conda install pytorch==1.12.1 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found