otaheri / chamfer_distance

Implementation of the Chamfer Distance as a module for PyTorch
MIT License
166 stars 20 forks source link

ImportError: No module named 'cd' #1

Closed liqi0126 closed 3 years ago

liqi0126 commented 3 years ago

When I run from chamfer_distance import ChamferDistance,it gives: image

Any idea?

HAN-oQo commented 3 years ago

i have a same issue. Did you get any solution?

liqi0126 commented 3 years ago

No, I end up implementing it by myself.

otaheri commented 3 years ago

What is your PyTorch version? have you tried with version 1.1.0? I just tried it, and it works. I will take a deeper look into this.

liqi0126 commented 3 years ago

I use PyTorch 1.7.0.

trungpham2606 commented 3 years ago

@otaheri The pytorch link you give is pytorch cpu ? Iam using the pytorch 1.6.0 + gpu. When I run import chamfer_distance it built again and failed.

otaheri commented 3 years ago

@trungpham2606 If you already have any version of PyTorch installed, you don't have to install the one that is referred to in readme again. So, just go with your installed PyTorch version and it should work.

otaheri commented 3 years ago

@liqi17thu I noticed that the Ninja package was missing from the requirements. Now it is added and it should work if you reinstall the package. Let me know if it is not working. Also, you need a PyTorch with Cuda support.

liqi0126 commented 3 years ago

Not working.... test with torch 1.7.1 image

otaheri commented 3 years ago

Can you try the Colab notebook that I prepared Here. I tried with torch1.7.1 and it works for me.

liqi0126 commented 3 years ago

The Colab notebook works for me too. I guess it is the driver's problem. I use Cuda 11.0. Which version are you using?

otaheri commented 3 years ago

I used it with pytorch1.6 and cu9.2 before and now I am using PyTorch 1.8 and Cuda 10.2 and it is ok with both.

SeanChenxy commented 3 years ago

@liqi17thu @otaheri Hi, I meet the same problem. Have you solved it? I wonder whether this is related to gcc/g++ version?

lileitech commented 2 years ago

The Colab notebook works for me too. I guess it is the driver's problem. I use Cuda 11.0. Which version are you using?

cuda 11.0 also did not work for me