TreeEnergyLoss icon indicating copy to clipboard operation
TreeEnergyLoss copied to clipboard

compile error

Open fsted opened this issue 3 years ago • 1 comments

Hi! Thank you for your code. This is a surprising article, but I encountered a confusing compilation error when I run setup.py: /home/anaconda3/compiler_compat/ld: cannot find -lc10 /home/anaconda3/compiler_compat/ld: cannot find -ltorch /home/anaconda3/compiler_compat/ld: cannot find -ltorch_cpu /home/anaconda3/compiler_compat/ld: cannot find -ltorch_python /home/anaconda3/compiler_compat/ld: cannot find -lc10_cuda /home/anaconda3/compiler_compat/ld: cannot find -ltorch_cuda collect2: error: ld returned 1 exit status error: command 'g++' failed with exit status 1 My environment is torch 1.7.1, cuda 10.1, and gcc 7.5. It looks OK, but an error occurs Looking forward your reply!

fsted avatar Dec 27 '22 11:12 fsted

For future reference, using a conda environment, I had to run the following command:

LDFLAGS=-L/PATH-TO-YOUR-ENV/lib/python3.8/site-packages/torch/lib python setup.py build develop

vniclas avatar Oct 25 '23 16:10 vniclas