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 '['which', 'c++']' returned non-zero exit status 1 #7

Open
koncle opened this issue Jul 20, 2019 · 2 comments

Comments

@koncle
Copy link

koncle commented Jul 20, 2019

I follow the installation in readme.md. But still got a problem when running the test.py file.
My torch version is 1.1.0, cudnn is 7.6.0, on ubuntu18.04.

Traceback (most recent call last):
  File "test.py", line 18, in <module>
    from modules import nn as NN
  File "/data/zj/pytorch-syncbn/modules/nn/__init__.py", line 1, in <module>
    from .syncbn import *
  File "/data/zj/pytorch-syncbn/modules/nn/syncbn.py", line 23, in <module>
    from modules.functional import batchnorm2d_sync
  File "/data/zj/pytorch-syncbn/modules/functional/__init__.py", line 1, in <module>
    from .syncbn import batchnorm2d_sync
  File "/data/zj/pytorch-syncbn/modules/functional/syncbn.py", line 17, in <module>
    from ._csrc import _backend
  File "/data/zj/pytorch-syncbn/modules/functional/_csrc.py", line 54, in <module>
    _backend = _load_C_extensions()
  File "/data/zj/pytorch-syncbn/modules/functional/_csrc.py", line 50, in _load_C_extensions
    extra_cuda_cflags=extra_cuda_cflags,
  File "/usr/local/anaconda3/envs/sharedEnv/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 644, in load
    is_python_module)
  File "/usr/local/anaconda3/envs/sharedEnv/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 813, in _jit_compile
    with_cuda=with_cuda)
  File "/usr/local/anaconda3/envs/sharedEnv/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 841, in _write_ninja_file_and_build
    check_compiler_abi_compatibility(compiler)
  File "/usr/local/anaconda3/envs/sharedEnv/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 162, in check_compiler_abi_compatibility
    if not check_compiler_ok_for_platform(compiler):
  File "/usr/local/anaconda3/envs/sharedEnv/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 138, in check_compiler_ok_for_platform
    which = subprocess.check_output(['which', compiler], stderr=subprocess.STDOUT)
  File "/usr/local/anaconda3/envs/sharedEnv/lib/python3.7/subprocess.py", line 395, in check_output
    **kwargs).stdout
  File "/usr/local/anaconda3/envs/sharedEnv/lib/python3.7/subprocess.py", line 487, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['which', 'c++']' returned non-zero exit status 1.
@yosagaf
Copy link

yosagaf commented Jun 24, 2020

Lookin for an answer, I have the same issue.

@shiyuetianqiang
Copy link

Maybe you need install python-dev

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

3 participants