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: No module named 'cd' #2

Open
QiNing-07 opened this issue Jul 1, 2021 · 6 comments
Open

ImportError: No module named 'cd' #2

QiNing-07 opened this issue Jul 1, 2021 · 6 comments

Comments

@QiNing-07
Copy link

I install pytorch and chamfer_distance, but when I run the Usage, the error is ' ImportError: No module named 'cd' ', my python is 3.6 and pytorch is 1.7 .

@QiNing-07
Copy link
Author

I debug chamfer_distance.py and find there is something missed.
2021-06-23 10-25-36屏幕截图
2021-07-02 11-32-34屏幕截图
I have only on 'cd' folder

@otaheri
Copy link
Owner

otaheri commented Jul 2, 2021

Hi @QiNing-07 , please take a look at the previous issue on this here. There you find a link to a collab notebook that I prepared and it works for other python and PyTorch versions.

@QiNing-07
Copy link
Author

Hi @QiNing-07 , please take a look at the previous issue on this here. There you find a link to a collab notebook that I prepared and it works for other python and PyTorch versions.

Hi @otaheri ,I have looked at the previous issue, but I run in Pycharm and it dose not work. It is so strange.

@otaheri
Copy link
Owner

otaheri commented May 5, 2022

Please try the solution here if you still face the issue.

@xqZhang-Strong
Copy link

I also comed to the error,and i just solved it by building cd with ninja. Concrete steps are as follows:

  1. I open the folder: /home/zxq/.cache/torch_extensions/cd/, there is a file named"build.ninja",and a line "ninja_required_version = 1.3" in it.
  2. Then i check my ninja version, and it is 1.8.2, so i uninstall it and download 1.3.0 from https://github.com/ninja-build/ninja/releases?page=2. Then I decompress it and come to its folder,
build ninja
$ ./bootstrap.py
then a file named "ninja" is generated at current directory
copy it to system directory, I use it in conda ,so copy it to env directory. if use it in system, you can change with "/usr/bin"
$ cp ninja /home/zxq/.conda/envs/pytorch-1.7/bin
check if ninja is installed successfully or not
$ ninja --version
  1. build project with ninja
$ cd /home/zxq/.cache/torch_extensions/py36_cu102/cd
$ ninja

Now, all is ok. We can try by execute test file.

I think the key is to find where the cd.so corresponding to your cuda should be, and generate it manually.

@ptxaxx
Copy link

ptxaxx commented Jul 25, 2022

I also comed to the error,and i just solved it by building cd with ninja. Concrete steps are as follows:

  1. I open the folder: /home/zxq/.cache/torch_extensions/cd/, there is a file named"build.ninja",and a line "ninja_required_version = 1.3" in it.
  2. Then i check my ninja version, and it is 1.8.2, so i uninstall it and download 1.3.0 from https://github.com/ninja-build/ninja/releases?page=2. Then I decompress it and come to its folder,
build ninja
$ ./bootstrap.py
then a file named "ninja" is generated at current directory
copy it to system directory, I use it in conda ,so copy it to env directory. if use it in system, you can change with "/usr/bin"
$ cp ninja /home/zxq/.conda/envs/pytorch-1.7/bin
check if ninja is installed successfully or not
$ ninja --version
  1. build project with ninja
$ cd /home/zxq/.cache/torch_extensions/py36_cu102/cd
$ ninja

Now, all is ok. We can try by execute test file.

I think the key is to find where the cd.so corresponding to your cuda should be, and generate it manually.

HI! I do not find this folder: .cache/torch_extensions/py36_cu102/cd
where should i find it?thank you

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

No branches or pull requests

4 participants