PyG Nightly (PyTorch Geometric Nightly)
raw JSON → 2.8.0.dev20260501 verified Fri May 01 auth: no python
Nightly build of PyTorch Geometric (PyG), a library for graph neural networks built on PyTorch. Current version 2.8.0.dev20260501. It tracks the latest development, includes experimental features and unreleased fixes, and is updated daily. Requires Python >=3.10 and PyTorch.
pip install pyg-nightly Common errors
error ModuleNotFoundError: No module named 'pyg' ↓
cause Incorrect import due to name mismatch between install and import.
fix
Use
import torch_geometric. error RuntimeError: torch_sparse is not installed. Please install it. ↓
cause Missing optional dependency for sparse operations.
fix
Install it:
pip install torch-sparse-nightly or use pip install pyg-nightly[full]. Warnings
breaking Nightly builds may introduce API-breaking changes without notice. Code that works with stable PyG may break with pyg-nightly. ↓
fix Pin to a specific nightly version if reproducibility is required, or use the stable release.
gotcha Import as `import torch_geometric`, not `import pyg`. The pip package name is different from the import name. ↓
fix Use `import torch_geometric`.
deprecated Some modules like `torch_geometric.nn.dense` are deprecated in favor of newer modules. ↓
fix Consult the changelog and migrate to the recommended replacements.
Install
pip install pyg-nightly -f https://data.pyg.org/whl/torch-2.5.0+cu121.html Imports
- torch_geometric wrong
import pygcorrectimport torch_geometric
Quickstart
import torch
import torch_geometric
from torch_geometric.data import Data
edge_index = torch.tensor([[0, 1, 1, 2],
[1, 0, 2, 1]], dtype=torch.long)
x = torch.tensor([[-1], [0], [1]], dtype=torch.float)
data = Data(x=x, edge_index=edge_index)
print(data)