Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: Cannot load Graphbolt C++ library #7450

Open
AnnaVitali opened this issue Jun 6, 2024 · 6 comments
Open

ImportError: Cannot load Graphbolt C++ library #7450

AnnaVitali opened this issue Jun 6, 2024 · 6 comments
Assignees

Comments

@AnnaVitali
Copy link

Hi, I have a problem in using the library on my pc in which I have the following configuration

PyTorch version: 2.3.1+cu121 CUDA version: 12.1

As indicated in the documentation I have installed the library with the command:

pip install dgl -f https://data.dgl.ai/wheels/torch-2.3/cu121/repo.html

but when I launch my script I get this error:

ImportError: Cannot load Graphbolt C++ library

I also did tests on Google Colab and in that case no error is generated, so the problems you have with running locally.

What can I do to solve this problem, if I do not want to run in Colab but in local?

@Rhett-Ying
Copy link
Collaborator

Pytorch 2.3.1 is not supported in the latest DGL yet. Please try with Pytorch 2.3.0 or previous versions.

@AnnaVitali
Copy link
Author

Sorry but even with torch 2.3.0 the problem persists

import torch

print(torch.__version__)

output: 2.3.0+cu121

Error

File "/opt/conda/lib/python3.10/site-packages/dgl/__init__.py", line 16, in <module>
    from . import (
File "/opt/conda/lib/python3.10/site-packages/dgl/dataloading/__init__.py", line 13, in <module>
  from .dataloader import *
File "/opt/conda/lib/python3.10/site-packages/dgl/dataloading/dataloader.py", line 27, in <module>
  from ..distributed import DistGraph
File "/opt/conda/lib/python3.10/site-packages/dgl/distributed/__init__.py", line 5, in <module>
  from .dist_graph import DistGraph, DistGraphServer, edge_split, node_split
File "/opt/conda/lib/python3.10/site-packages/dgl/distributed/dist_graph.py", line 11, in <module>
  from .. import backend as F, graphbolt as gb, heterograph_index
File "/opt/conda/lib/python3.10/site-packages/dgl/graphbolt/__init__.py", line 36, in <module>
  load_graphbolt()
File "/opt/conda/lib/python3.10/site-packages/dgl/graphbolt/__init__.py", line 33, in load_graphbolt
  raise ImportError("Cannot load Graphbolt C++ library")
ImportError: Cannot load Graphbolt C++ library

@Rhett-Ying
Copy link
Collaborator

what is your local OS version? and please check the glibc version as well.

@mfbalin
Copy link
Collaborator

mfbalin commented Jul 11, 2024

@AnnaVitali DGL 2.3 release is out. It should support torch 2.3.1.

@yfismine
Copy link

what is your local OS version? and please check the glibc version as well.
python: 3.12.0
os: centos8
lld: ldd (GNU libc) 2.28

conda install pytorch=2.3.0 cpuonly torchmetrics=1.4.0 -c pytorch -c conda-forge -y
conda install dgl=2.2.1 -c dglteam/label/th23_cpu -y

It works normally on x86, but there is a general error on arm.

Copy link

This issue has been automatically marked as stale due to lack of activity. It will be closed if no further activity occurs. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants