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

ModuleNotFoundError: No module named 'kaolin.nnsearch' #52

Closed
Shabayek opened this issue Nov 26, 2019 · 13 comments
Closed

ModuleNotFoundError: No module named 'kaolin.nnsearch' #52

Shabayek opened this issue Nov 26, 2019 · 13 comments

Comments

@Shabayek
Copy link

I'm using pytorch:19.10-py3 docker image (docker pull nvcr.io/nvidia/pytorch:19.10-py3). I get the following error:
.......

Finished processing dependencies for kaolin==0.2.0+a76a004
root@d404b78867d9:/workspace/kaolin# python
Python 3.6.9 |Anaconda, Inc.| (default, Jul 30 2019, 19:07:31)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import kaolin as kal
Traceback (most recent call last):
File "", line 1, in
File "/workspace/kaolin/kaolin/init.py", line 17, in
from kaolin import conversions
File "/workspace/kaolin/kaolin/conversions/init.py", line 1, in
from kaolin.conversions.meshconversions import *
File "/workspace/kaolin/kaolin/conversions/meshconversions.py", line 22, in
from kaolin.metrics.point import directed_distance as directed_distance
File "/workspace/kaolin/kaolin/metrics/init.py", line 2, in
from .point import *
File "/workspace/kaolin/kaolin/metrics/point.py", line 16, in
from kaolin.nnsearch import nnsearch
ModuleNotFoundError: No module named 'kaolin.nnsearch'

@stephendb
Copy link

Same error. I installed pytorch using conda on ubuntu 18.04 as per the instructions.

@shersoni610
Copy link

I had the same issue but it seems to get resolved if I run the code outside the directory i.e. above
README,md folder.

@Shabayek
Copy link
Author

Shabayek commented Nov 27, 2019

@shersoni610 : I tried the same in both 1) the docker image and 2) a conda environment, but I get the following error:
In the docker image:
.....................
Using /opt/conda/lib/python3.6/site-packages
Finished processing dependencies for kaolin==0.2.0+a76a004
No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda'
Traceback (most recent call last):
File "kaolin/setup.py", line 192, in
ext_modules=cythonize(ext_modules),
File "/opt/conda/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 897, in cythonize
aliases=aliases)
File "/opt/conda/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 777, in create_extension_list
for file in nonempty(sorted(extended_iglob(filepattern)), "'%s' doesn't match any files" % filepattern):
File "/opt/conda/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 102, in nonempty
raise ValueError(error_msg)
ValueError: 'kaolin/cython/triangle_hash.pyx' doesn't match any files

For sure the cuda runtime exists as I'm working inside the docker image. Running nvcc --version:
root@870ec9066a81:/workspace# nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:07:16_PDT_2019
Cuda compilation tools, release 10.1, V10.1.243

On the other machine using conda environment:
The following error:
....................
Using /mnt/users/user/miniconda3/envs/kaoline/lib/python3.6/site-packages/decorator-4.4.1-py3.6.egg
Finished processing dependencies for kaolin==0.2.0+05e6433
Traceback (most recent call last):
File "kaolin/setup.py", line 192, in
ext_modules=cythonize(ext_modules),
File "/home/users/user/miniconda3/envs/kaoline/lib/python3.6/site-packages/Cython-0.29.14-py3.6-linux-x86_64.egg/Cython/Build/Dependencies.py", line 966, in cythonize
aliases=aliases)
File "/home/users/user/miniconda3/envs/kaoline/lib/python3.6/site-packages/Cython-0.29.14-py3.6-linux-x86_64.egg/Cython/Build/Dependencies.py", line 810, in create_extension_list
for file in nonempty(sorted(extended_iglob(filepattern)), "'%s' doesn't match any files" % filepattern):
File "/home/users/user/miniconda3/envs/kaoline/lib/python3.6/site-packages/Cython-0.29.14-py3.6-linux-x86_64.egg/Cython/Build/Dependencies.py", line 109, in nonempty
raise ValueError(error_msg)
ValueError: 'kaolin/cython/triangle_hash.pyx' doesn't match any files

Running python (same result from the docker and the conda environment):
root@870ec9066a81:/workspace# python
Python 3.6.9 |Anaconda, Inc.| (default, Jul 30 2019, 19:07:31)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import kaolin as kal
print(kal.version)
Traceback (most recent call last):
File "", line 1, in
AttributeError: module 'kaolin' has no attribute 'version'

(kaoline) [user@194 ~]$ python
Python 3.6.9 |Anaconda, Inc.| (default, Jul 30 2019, 19:07:31)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import kaolin as kal
print(kal.version)
Traceback (most recent call last):
File "", line 1, in
AttributeError: module 'kaolin' has no attribute 'version'

@Kuldaen
Copy link

Kuldaen commented Nov 27, 2019

I had the same issue but it seems to get resolved if I run the code outside the directory i.e. above
README,md folder.

I'm getting the same and this also fixes it for me.

@Kuldaen
Copy link

Kuldaen commented Nov 27, 2019

Actually it seems to work as long as it is in any folder besides the root of the git repository. ie I can go into examples and it is fine

@Shabayek
Copy link
Author

Shabayek commented Nov 28, 2019

@Kuldaen : I tried again from another folder beside the root of kaolin but I still get the same error:
....................
Finished processing dependencies for kaolin==0.2.0+05e6433
Traceback (most recent call last):
File "../kaolin/setup.py", line 192, in
ext_modules=cythonize(ext_modules),
File "/home/users/user/miniconda3/envs/kaoline/lib/python3.6/site-packages/Cython-0.29.14-py3.6-linux-x86_64.egg/Cython/Build/Dependencies.py", line 966, in cythonize
aliases=aliases)
File "/home/users/user/miniconda3/envs/kaoline/lib/python3.6/site-packages/Cython-0.29.14-py3.6-linux-x86_64.egg/Cython/Build/Dependencies.py", line 810, in create_extension_list
for file in nonempty(sorted(extended_iglob(filepattern)), "'%s' doesn't match any files" % filepattern):
File "/home/users/user/miniconda3/envs/kaoline/lib/python3.6/site-packages/Cython-0.29.14-py3.6-linux-x86_64.egg/Cython/Build/Dependencies.py", line 109, in nonempty
raise ValueError(error_msg)
ValueError: 'kaolin/cython/triangle_hash.pyx' doesn't match any files

@Kuldaen
Copy link

Kuldaen commented Nov 28, 2019

Sorry but cythonize error is something different from the nnsearch problem. You should create a new issue.

@Shabayek Shabayek changed the title ModuleNotFoundError: No module named 'kaolin.nnsearch' ModuleNotFoundError: No module named 'kaolin.nnsearch' / ValueError: 'kaolin/cython/triangle_hash.pyx' doesn't match any files Nov 28, 2019
@Shabayek Shabayek changed the title ModuleNotFoundError: No module named 'kaolin.nnsearch' / ValueError: 'kaolin/cython/triangle_hash.pyx' doesn't match any files ModuleNotFoundError: No module named 'kaolin.nnsearch' Nov 28, 2019
@Shabayek
Copy link
Author

Shabayek commented Nov 28, 2019

It is a follow up which happens when I start the installation from the parent directory of kaolin or another directory in the same level of kaolin. Otherwise, there is the no module named 'kaolin.nnsearch' error. Please recall that the instructions are to install from the kaolin directory. I created issue #60 for the new error.

@Kuldaen
Copy link

Kuldaen commented Nov 28, 2019

you can't run the installation from outside or in another directory. it has to be in the root of the git repository. you only have to run this once per virtual enviroment.

the nnsearch problem is separate, once you have installed it properly from there, you only need to run any python scripts that use kaolin from another directory.

@Shabayek
Copy link
Author

Shabayek commented Nov 28, 2019

If I run the code from outside the directory I get the following error:
(kaoline) [user@access1 ~]$ python
Python 3.6.9 |Anaconda, Inc.| (default, Jul 30 2019, 19:07:31)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import kaolin as kal
print(kal.version)
Traceback (most recent call last):
File "", line 1, in
AttributeError: module 'kaolin' has no attribute 'version'

(kaoline) [user@access1 ~]$ python kaolin/examples/Classification/pointcloud_classification.py
Traceback (most recent call last):
File "kaolin/examples/Classification/pointcloud_classification.py", line 5, in
import kaolin as kal
ModuleNotFoundError: No module named 'kaolin'

@Kuldaen
Copy link

Kuldaen commented Nov 28, 2019

it should be print(kal.__version__)

@Shabayek
Copy link
Author

Shabayek commented Nov 28, 2019

This is what I'm doing but the underscores are automatically removed by the editor!!

Follows another example:
(kaoline) [user@access1 ~]$ python kaolin/examples/Classification/pointcloud_classification.py
Traceback (most recent call last):
File "kaolin/examples/Classification/pointcloud_classification.py", line 5, in
import kaolin as kal
ModuleNotFoundError: No module named 'kaolin'

@Caenorst
Copy link
Collaborator

Hi, thank you for using Kaolin! The library went through a major rewrite with the version 0.9.0, and only the core library components we can thoroughly test and maintain are now part of this repository. Please refer to our latest documentation:
https://kaolin.readthedocs.io/en/latest/

Closing the bug as it is no longer relevant to this repo.

3a1b2c3 pushed a commit to 3a1b2c3/kaolin-windows that referenced this issue Nov 6, 2022
…y_rendering

 ERROR FIX: fix density rendering error for packed tracer
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

5 participants