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

subprocess.CalledProcessError: Command '['where', 'cl']' returned non-zero exit status 1. #3

Open
zc6189 opened this issue Sep 2, 2021 · 6 comments

Comments

@zc6189
Copy link

zc6189 commented Sep 2, 2021

there is a problem when running with the pycharm in windows

@lileitech
Copy link

there is a problem when running with the pycharm in windows

I met the same problem. Have you solve it?

@otaheri
Copy link
Owner

otaheri commented Jan 18, 2022

Can you point to the specific problem please? What is the error that you receive?

@podragonwer
Copy link

I have the same problem:

import chamfer_distance

Traceback (most recent call last):
File "", line 1, in
File "C:\Users\alienware\anaconda3\envs\torch\lib\site-packages\chamfer_distance_init_.py", line 1, in
from .chamfer_distance import ChamferDistance
File "C:\Users\alienware\anaconda3\envs\torch\lib\site-packages\chamfer_distance\chamfer_distance.py", line 10, in
f_path + '/chamfer_distance.cu'])
File "C:\Users\alienware\anaconda3\envs\torch\lib\site-packages\torch\utils\cpp_extension.py", line 1091, in load
keep_intermediates=keep_intermediates)
File "C:\Users\alienware\anaconda3\envs\torch\lib\site-packages\torch\utils\cpp_extension.py", line 1302, in _jit_compile
is_standalone=is_standalone)
File "C:\Users\alienware\anaconda3\envs\torch\lib\site-packages\torch\utils\cpp_extension.py", line 1400, in _write_ninja_file_and_build_library
is_standalone=is_standalone)
File "C:\Users\alienware\anaconda3\envs\torch\lib\site-packages\torch\utils\cpp_extension.py", line 1833, in _write_ninja_file_to_build_library
with_cuda=with_cuda)
File "C:\Users\alienware\anaconda3\envs\torch\lib\site-packages\torch\utils\cpp_extension.py", line 1948, in _write_ninja_file
'cl']).decode().split('\r\n')
File "C:\Users\alienware\anaconda3\envs\torch\lib\subprocess.py", line 376, in check_output
**kwargs).stdout
File "C:\Users\alienware\anaconda3\envs\torch\lib\subprocess.py", line 468, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['where', 'cl']' returned non-zero exit status 1.

@podragonwer
Copy link

then I followed this

import chamfer_distance

Traceback (most recent call last):
File "", line 1, in
File "C:\Users\alienware\anaconda3\envs\torch\lib\site-packages\chamfer_distance_init_.py", line 1, in
from .chamfer_distance import ChamferDistance
File "C:\Users\alienware\anaconda3\envs\torch\lib\site-packages\chamfer_distance\chamfer_distance.py", line 10, in
f_path + '/chamfer_distance.cu'])
File "C:\Users\alienware\anaconda3\envs\torch\lib\site-packages\torch\utils\cpp_extension.py", line 1091, in load
keep_intermediates=keep_intermediates)
File "C:\Users\alienware\anaconda3\envs\torch\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 "C:\Users\alienware\anaconda3\envs\torch\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 "C:\Users\alienware\anaconda3\envs\torch\lib\imp.py", line 297, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named 'cd'

I use cuda 11 and llooking at this i think it's a driver prob;lem

@lileitech
Copy link

I have the same problem:

import chamfer_distance

Traceback (most recent call last): File "", line 1, in File "C:\Users\alienware\anaconda3\envs\torch\lib\site-packages\chamfer_distance__init__.py", line 1, in from .chamfer_distance import ChamferDistance File "C:\Users\alienware\anaconda3\envs\torch\lib\site-packages\chamfer_distance\chamfer_distance.py", line 10, in f_path + '/chamfer_distance.cu']) File "C:\Users\alienware\anaconda3\envs\torch\lib\site-packages\torch\utils\cpp_extension.py", line 1091, in load keep_intermediates=keep_intermediates) File "C:\Users\alienware\anaconda3\envs\torch\lib\site-packages\torch\utils\cpp_extension.py", line 1302, in _jit_compile is_standalone=is_standalone) File "C:\Users\alienware\anaconda3\envs\torch\lib\site-packages\torch\utils\cpp_extension.py", line 1400, in _write_ninja_file_and_build_library is_standalone=is_standalone) File "C:\Users\alienware\anaconda3\envs\torch\lib\site-packages\torch\utils\cpp_extension.py", line 1833, in _write_ninja_file_to_build_library with_cuda=with_cuda) File "C:\Users\alienware\anaconda3\envs\torch\lib\site-packages\torch\utils\cpp_extension.py", line 1948, in _write_ninja_file 'cl']).decode().split('\r\n') File "C:\Users\alienware\anaconda3\envs\torch\lib\subprocess.py", line 376, in check_output **kwargs).stdout File "C:\Users\alienware\anaconda3\envs\torch\lib\subprocess.py", line 468, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['where', 'cl']' returned non-zero exit status 1.

Hi,

I think maybe this package can not use in windows system. Currently, I am using it in Linux system, and no errors have been reported. Therefore, I recommend you try it on linux system.

Hope this information can be helpful.

@otaheri
Copy link
Owner

otaheri commented May 5, 2022

I could solve the issues by reinstalling the python dependencies with the commands below. Hopefully it will work for you too. Please let me know if this still doesn't work.

sudo apt install libpython3.X-dev ## replace X with your python version
sudo apt-get install python3-dev
sudo apt-get install python-dev

## GCC version should be equal or lower than 7, replace X with your version
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-X 10 
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-X 10 
## 10 is the priority, you can set it to any other number, but it should be higher than other gcc/g++ versions

sudo apt-get install --reinstall build-essential

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