nomewang / M3DM

MIT License
146 stars 19 forks source link

Command '['where', 'cl']' returned non-zero exit status 1. #2

Closed tinaYA524 closed 1 year ago

tinaYA524 commented 1 year ago

First of all, thank you very much for sharing the code. It is a pity that I did not execute it well.

I used the data of MVTec 3D and eyecandies respectively, and the following errors appeared. It would be great if you could help me solve this problem. Thank you again for your work!

D:\anaconda3\envs\3d_cp38\python.exe E:\projects\CLIP_\M3DM-main\main.py 
D:\anaconda3\envs\3d_cp38\lib\site-packages\torch\utils\cpp_extension.py:305: UserWarning: Error checking compiler version for cl: [WinError 2] 系统找不到指定的文件。
  warnings.warn(f'Error checking compiler version for {compiler}: {error}')
��Ϣ: ���ṩ��ģʽ�޷��ҵ��ļ���
Traceback (most recent call last):
  File "E:\projects\CLIP_\M3DM-main\main.py", line 2, in <module>
    from m3dm_runner import M3DM
  File "E:\projects\CLIP_\M3DM-main\m3dm_runner.py", line 5, in <module>
    from feature_extractors import multiple_features
  File "E:\projects\CLIP_\M3DM-main\feature_extractors\multiple_features.py", line 2, in <module>
    from feature_extractors.features import Features
  File "E:\projects\CLIP_\M3DM-main\feature_extractors\features.py", line 18, in <module>
    from knn_cuda import KNN
  File "D:\anaconda3\envs\3d_cp38\lib\site-packages\knn_cuda\__init__.py", line 38, in <module>
    _knn = load_cpp_ext("knn")
  File "D:\anaconda3\envs\3d_cp38\lib\site-packages\knn_cuda\__init__.py", line 26, in load_cpp_ext
    ext = load(
  File "D:\anaconda3\envs\3d_cp38\lib\site-packages\torch\utils\cpp_extension.py", line 1080, in load
    return _jit_compile(
  File "D:\anaconda3\envs\3d_cp38\lib\site-packages\torch\utils\cpp_extension.py", line 1293, in _jit_compile
    _write_ninja_file_and_build_library(
  File "D:\anaconda3\envs\3d_cp38\lib\site-packages\torch\utils\cpp_extension.py", line 1392, in _write_ninja_file_and_build_library
    _write_ninja_file_to_build_library(
  File "D:\anaconda3\envs\3d_cp38\lib\site-packages\torch\utils\cpp_extension.py", line 1824, in _write_ninja_file_to_build_library
    _write_ninja_file(
  File "D:\anaconda3\envs\3d_cp38\lib\site-packages\torch\utils\cpp_extension.py", line 1949, in _write_ninja_file
    cl_paths = subprocess.check_output(['where',
  File "D:\anaconda3\envs\3d_cp38\lib\subprocess.py", line 415, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "D:\anaconda3\envs\3d_cp38\lib\subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['where', 'cl']' returned non-zero exit status 1.
nomewang commented 1 year ago

We didn't test our code in Windows, and the problem seems like the wrong packages have been installed.

If you were testing our code in Windows, please try the following commands to install KNN_CUDA:

git clone --branch windows https://github.com/unlimblue/KNN_CUDA.git
cd C:\\PATH_TO_KNN_CUDA
make
make install

according to https://github.com/unlimblue/KNN_CUDA.