FileNotFoundError: Cannot find DGL C++ sparse library 04/26

Hi, I was just trying the new sparse matrix feature and had this error FileNotFoundError: Cannot find DGL C++ sparse library at /home/usr_name/.local/lib/python3.8/site-packages/dgl/dgl_sparse/libdgl_sparse_pytorch_2.0.0.so.
I saw an earlier question with the same issue and solved by updating PyTorch: https://discuss.dgl.ai/t/filenotfounderror-cannot-find-dgl-c-sparse-library/3507

I tried the same way but didn’t work. I had dgl before and already uninstalled earlier versions.

  • DGL Version: 1.0.1, dglg0 0.0.2
  • Backend Library & Version: pytorch 2.0.0+cu117
  • OS: ubuntu 20.04.4
  • How you installed DGL (conda, pip, source): pip
  • Python version: 3.8.10
  • CUDA/cuDNN version: Cuda compilation tools, release 11.7

Hi @ShaohuiLiu ,

DGL 1.0.1 does not support Pytorch 2.0. Could you try the latest (v1.0.2)?

Thanks for the reply. I ended up in another weird issue, somehow I can only install 1.0.1

pip install  dgl -f https://data.dgl.ai/wheels/cu117/repo.html

Could you try again? Here is what I got:

gq@REM-5CG2143D2R:~$ pip install  dgl -f https://data.dgl.ai/wheels/cu117/repo.html
Defaulting to user installation because normal site-packages is not writeable
Looking in links: https://data.dgl.ai/wheels/cu117/repo.html
DEPRECATION: The HTML index page being used (https://data.dgl.ai/wheels/cu117/repo.html) is not a proper HTML 5 document. This is in violation of PEP 503 which requires these pages to be well-formed HTML 5 documents. Please reach out to the owners of this index page, and ask them to update this index page to a valid HTML 5 document. pip 22.2 will enforce this behaviour change. Discussion can be found at https://github.com/pypa/pip/issues/10825
Collecting dgl
  Downloading https://data.dgl.ai/wheels/cu117/dgl-1.0.2%2Bcu117-cp310-cp310-manylinux1_x86_64.whl (266.5 MB)
1 Like

It works now! Thank you so much for helping out!

Successfully installed dgl-1.0.2+cu117

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.