I have been having the same and exact problem for months and I could’t find a way to solve it. I also downloaded the official docker image from nvidia and dgl “nvcr.io/nvidia/dgl:24.05-py3”, installed there torch and dgl using pip:
torch==2.3.1
torch-tensorrt @ file:///opt/pytorch/torch_tensorrt/dist/torch_tensorrt-2.4.0a0-cp310-cp310-linux_x86_64.whl#sha256=e62c367c26869d8358a50e20e72279d2f28abd0596194554736156639434cf4d
torchaudio==2.3.1
torchdata==0.7.1
torchvision==0.18.1
dgl @ file:///opt/dgl/dgl-source/python/dist/dgl-2.2.1-cp310-cp310-linux_x86_64.whl#sha256=034e429957903526b5fd890f74c80430b78663ad50afcb9056e239b3b9b35428
As soon as I import dgl I get the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.10/dist-packages/dgl/__init__.py", line 16, in <module>
from . import (
File "/usr/local/lib/python3.10/dist-packages/dgl/dataloading/__init__.py", line 13, in <module>
from .dataloader import *
File "/usr/local/lib/python3.10/dist-packages/dgl/dataloading/dataloader.py", line 27, in <module>
from ..distributed import DistGraph
File "/usr/local/lib/python3.10/dist-packages/dgl/distributed/__init__.py", line 5, in <module>
from .dist_graph import DistGraph, DistGraphServer, edge_split, node_split
File "/usr/local/lib/python3.10/dist-packages/dgl/distributed/dist_graph.py", line 11, in <module>
from .. import backend as F, graphbolt as gb, heterograph_index
File "/usr/local/lib/python3.10/dist-packages/dgl/graphbolt/__init__.py", line 36, in <module>
load_graphbolt()
File "/usr/local/lib/python3.10/dist-packages/dgl/graphbolt/__init__.py", line 26, in load_graphbolt
raise FileNotFoundError(
FileNotFoundError: Cannot find DGL C++ graphbolt library at /usr/local/lib/python3.10/dist-packages/dgl/graphbolt/libgraphbolt_pytorch_2.3.1.so
Please help me fix it. It’s unacceptable that even the docker image suggested to build container to work with dgl have this problem with graphbolt.