Skip to content

torch_sparse and torch_scatter are not correctly installed when following the torch_geomtric installation instructions #10686

@finnoshea

Description

@finnoshea

😵 Describe the installation problem

When I try to run torch_geometric on a brand new conda environment, I get a warning from both torch_sparse and torch_scatter:

/anaconda3/envs/new_env/lib/python3.12/site-packages/torch_geometric/init.py:4: UserWarning: An issue occurred while importing 'torch-scatter'. Disabling its usage. Stacktrace: Could not load this library: /anaconda3/envs/new_env/lib/python3.12/site-packages/torch_scatter/_version_cuda.so
import torch_geometric.typing
/anaconda3/envs/new_env/lib/python3.12/site-packages/torch_geometric/init.py:4: UserWarning: An issue occurred while importing 'torch-sparse'. Disabling its usage. Stacktrace: Could not load this library: /anaconda3/envs/new_env/lib/python3.12/site-packages/torch_sparse/_version_cuda.so
import torch_geometric.typing

Method to recreate the problem:

  1. Create a brand new conda environment conda create --name new_env python=3.12 and then activate it conda activate new_env;
  2. Install pytorch: pip install torch torchvision --index-url https://download.pytorch.org/whl/cu128
  3. Install torch_geometric: pip install torch_geometric
  4. Install the optional stuff: pip install pyg_lib torch_scatter torch_sparse -f https://data.pyg.org/whl/torch-2.11.0+cu128.html
  5. try to run anything that imports torch_geometric and you will see the above, quoted warnings.

Environment

  • PyG version: 2.7.0
  • PyTorch version: 2.11.0
  • OS: Red Hat 8.6 (Ootpa)
  • Python version: 3.12.13
  • CUDA/cuDNN version: 12.8, I guess.
  • How you installed PyTorch and PyG (conda, pip, source): see above instructions
  • Any other relevant information (e.g., version of torch-scatter): no idea, I am just following the instructions

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions