KNN_CUDA icon indicating copy to clipboard operation
KNN_CUDA copied to clipboard

ImportError: No module named 'knn'

Open louyz1026 opened this issue 2 years ago • 5 comments

from knn_cuda import KNN

File "E:\ProgramFiles\Anaconda3\envs\pytorch37\lib\site-packages\knn_cuda_init_.py", line 38, in knn = load_cpp_ext("knn") File "E:\ProgramFiles\Anaconda3\envs\pytorch37\lib\site-packages\knn_cuda_init.py", line 33, in load_cpp_ext with_cuda=True File "E:\ProgramFiles\Anaconda3\envs\pytorch37\lib\site-packages\torch\utils\cpp_extension.py", line 1091, in load keep_intermediates=keep_intermediates) File "E:\ProgramFiles\Anaconda3\envs\pytorch37\lib\site-packages\torch\utils\cpp_extension.py", line 1317, in _jit_compile return _import_module_from_library(name, build_directory, is_python_module) File "E:\ProgramFiles\Anaconda3\envs\pytorch37\lib\site-packages\torch\utils\cpp_extension.py", line 1699, in _import_module_from_library file, path, description = imp.find_module(module_name, [path]) File "E:\ProgramFiles\Anaconda3\envs\pytorch37\lib\imp.py", line 296, in find_module raise ImportError(_ERR_MSG.format(name), name=name) ImportError: No module named 'knn'

Hello, I install with the code "pip install --upgrade https://github.com/unlimblue/KNN_CUDA/releases/download/0.2/KNN_CUDA-0.2-py3-none-any.whl". image But I don't know how to solve this problem. Looking forward to your answer, thanks.

louyz1026 avatar Aug 03 '22 06:08 louyz1026

I have the same problem, have you solve it?

laurapd avatar Nov 14 '22 12:11 laurapd

I have the same

xiaolongTang163 avatar Nov 19 '22 06:11 xiaolongTang163

image

xiaolongTang163 avatar Nov 19 '22 06:11 xiaolongTang163

I guess it is some kind of version mismatch. For me it helped to setup the conda environment from scratch. My versions according to conda env export --from-history:

- python=3.7
- torchvision==0.12.0
- cudatoolkit=11.3
- pytorch==1.11.0
- gcc=8.5
- cuda
- gxx=8.5
- ninja
- libpthread-stubs
- xorg-libpthread-stubs

laurapd avatar Nov 21 '22 08:11 laurapd

Maybe it was an environment conflict. I created a new environment and successfully installed the knn_cuda on windows 11.

Sklud1456 avatar Jan 09 '23 02:01 Sklud1456