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.

Can't install torch-(scatter|sparse|cluster|spline-conv)

See original GitHub issue

📚 Installation

Running python -c "import torch; print(torch.__version__)" gives 1.6.0 Running python -c "import torch; print(torch.version.cuda)" gives 10.2.

Yet, with the following:

pip install torch-scatter==latest+${CUDA} -f https://pytorch-geometric.com/whl/torch-${TORCH}.html
pip install torch-sparse==latest+${CUDA} -f https://pytorch-geometric.com/whl/torch-${TORCH}.html
pip install torch-cluster==latest+${CUDA} -f https://pytorch-geometric.com/whl/torch-${TORCH}.html
pip install torch-spline-conv==latest+${CUDA} -f https://pytorch-geometric.com/whl/torch-${TORCH}.html
pip install torch-geometric

I can install only torch-geometric, while for the first 4 packages I get the following error:

...
  File "/data/l989o/miniconda3/envs/spatial_uzh/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 290, in __init__
    wheel_version = Version(wheel.version)
  File "/data/l989o/miniconda3/envs/spatial_uzh/lib/python3.8/site-packages/pip/_vendor/packaging/version.py", line 298, in __init__
    raise InvalidVersion("Invalid version: '{0}'".format(version))
pip._vendor.packaging.version.InvalidVersion: Invalid version: 'latest+cu102'

Environment

  • OS: RETTY_NAME=“CentOS Linux 7 (Core)”
  • Python version: 3.8.0
  • PyTorch version: 1.6.0
  • CUDA/cuDNN version: 10.2
  • GCC version: 7.2.0
  • How did you try to install PyTorch Geometric and its extensions (wheel, source): wheel
  • Any other relevant information:

Checklist

  • I followed the installation guide.
  • I cannot find my error message in the FAQ.
  • [/] I set up CUDA correctly and can compile CUDA code via nvcc. Cuda works perfectly with torch, but I don’t have nvcc (I am using a machine partly managed by the institute)
  • [/] I do have multiple CUDA versions on my machine. I think yes: nvidia-smi gives 10.2, but I can also use cuda 9.2 with torch, so yes, I guess I have multiple versions installed.

Additional context

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
rusty1scommented, Dec 1, 2020

This is now resolved. You can now install the packages via:

pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html
pip install torch-sparse -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html
pip install torch-cluster -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html
pip install torch-spline-conv -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html

For example, for installing for PyTorch 1.7.0 with CUDA 11.0, type:

pip install torch-scatter torch-sparse torch-cluster torch-spline-conv -f https://pytorch-geometric.com/whl/torch-torch-1.7.0+cu110.html

All “old” links are still intact. You can have a look at all possible combinations here.

1reaction
bdicecommented, Dec 1, 2020

Good solution, @rusty1s! Thanks again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't install torch-(scatter|sparse|cluster|spline-conv) #1876
Running python -c "import torch; print(torch.version.cuda)" gives 10.2 . Yet, with the following: pip install torch-scatter==latest+${CUDA ...
Read more >
Installation — pytorch_geometric documentation
Installation via Pip Wheels · Ensure that at least PyTorch 1.12.0 is installed: · Find the CUDA version PyTorch was installed...
Read more >
pytorch - install torch-cluster==1.5.4 and torch-scatter==2.0.4 ...
I have a problem. For example, when installing torch-cluster1.5.4, I encountered the following error while installing Torch1.4.
Read more >
Please add "pytorch_geometric" to the CPU kernels - Kaggle
In GPU mode, I can not install PyTorch geometric. Anyone else succeeds? I tried many methods from https://pytorch-geometric.readthedocs.io/en/latest/notes/ ...
Read more >
torch-geometric - PyPI
pip install torch-geometric ... e.g., pyg-lib , torch-scatter , torch-sparse and torch-cluster . ... pip install torch-cluster torch-spline-conv -f ...
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