Install DGL from source

Can’t install DGL from the source on CentOS.
When using python setup.py install, it throws 'Runtime Error: Cannot find the files. ’
List of candidates:
libdgl.so

Have you compiled DGL? Before you call python setup.py install, make sure you have built DGL:

git clone https://github.com/dmlc/dgl.git --recurse
cd dgl
mkdir build && cd build
cmake .. && make -j4
cd ../python
python setup.py install
3 Likes

Thanks for your answer, I’ll try it soon

The following worked for me in solving the same error:

The setup.py is searching for the libdgl.so file, but it cannot find it. Please perform a search for the libdgl.so file on your system. Once you locate it, copy the file, and then paste it into one of the addresses listed under the List of candidates below. The addresses represent potential locations where thelibdgl.so file can be placed.

For example, I got this error as follows:

RuntimeError: Cannot find the files.
List of candidates:
/usr/local/cuda-11.3/lib64/libdgl.so
/usr/local/cuda/lib64/libdgl.so
/usr/local/cuda-11.4/lib64/libdgl.so
/usr/local/cuda-11.3/lib64/libdgl.so
/usr/local/cuda/lib64/libdgl.so
/usr/local/cuda-11.4/lib64/libdgl.so
/media/irfanserver/새 볼륨/development/ubuntu/GNS_DGL/dgl/python/dgl/libdgl.so
/media/irfanserver/새 볼륨/development/ubuntu/GNS_DGL/dgl/build/libdgl.so
/media/irfanserver/새 볼륨/development/ubuntu/GNS_DGL/dgl/build/Release/libdgl.so
/media/irfanserver/새 볼륨/development/ubuntu/GNS_DGL/dgl/lib/libdgl.so
/media/irfanserver/새 볼륨/development/ubuntu/GNS_DGL/libdgl.so

So, I searched and put the libdgl.so at /media/irfanserver/새 볼륨/development/ubuntu/GNS_DGL/dgl/python/dgl/, and everything worked.