subprocess.CalledProcessError: Command '['which', 'g++']' returned non-zero exit status 1.
See original GitHub issueInstalling detectron2 on GCP VM(Debian)(without GPU) and I am getting this error. Following the exact instructions from Tutorial Notebook.
- Logs:
writing dependency_links to detectron2.egg-info/dependency_links.txt
writing requirements to detectron2.egg-info/requires.txt
writing top-level names to detectron2.egg-info/top_level.txt
reading manifest file 'detectron2.egg-info/SOURCES.txt'
writing manifest file 'detectron2.egg-info/SOURCES.txt'
running build_ext
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/mnt/disks/cv/detectron2_repo2/setup.py", line 141, in <module>
cmdclass={"build_ext": torch.utils.cpp_extension.BuildExtension},
File "/mnt/disks/cv/anaconda3/envs/cvmodel/lib/python3.6/site-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/mnt/disks/cv/anaconda3/envs/cvmodel/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/mnt/disks/cv/anaconda3/envs/cvmodel/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/mnt/disks/cv/anaconda3/envs/cvmodel/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/mnt/disks/cv/anaconda3/envs/cvmodel/lib/python3.6/site-packages/setuptools/command/develop.py", line 38, in run
self.install_for_development()
File "/mnt/disks/cv/anaconda3/envs/cvmodel/lib/python3.6/site-packages/setuptools/command/develop.py", line 140, in install_for_development
self.run_command('build_ext')
File "/mnt/disks/cv/anaconda3/envs/cvmodel/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/mnt/disks/cv/anaconda3/envs/cvmodel/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/mnt/disks/cv/anaconda3/envs/cvmodel/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 84, in run
_build_ext.run(self)
File "/mnt/disks/cv/anaconda3/envs/cvmodel/lib/python3.6/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "/mnt/disks/cv/anaconda3/envs/cvmodel/lib/python3.6/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/mnt/disks/cv/anaconda3/envs/cvmodel/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 238, in build_extensions
self._check_abi()
File "/mnt/disks/cv/anaconda3/envs/cvmodel/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 380, in _check_abi
check_compiler_abi_compatibility(compiler)
File "/mnt/disks/cv/anaconda3/envs/cvmodel/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 168, in check_compiler_abi_compatibility
if not check_compiler_ok_for_platform(compiler):
File "/mnt/disks/cv/anaconda3/envs/cvmodel/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 144, in check_compiler_ok_for_platform
which = subprocess.check_output(['which', compiler], stderr=subprocess.STDOUT)
File "/mnt/disks/cv/anaconda3/envs/cvmodel/lib/python3.6/subprocess.py", line 356, in check_output
**kwargs).stdout
File "/mnt/disks/cv/anaconda3/envs/cvmodel/lib/python3.6/subprocess.py", line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['which', 'g++']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: /mnt/disks/cv/anaconda3/envs/cvmodel/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/mnt/disks/cv/detectron2_repo2/setup.py'"'"'
; __file__='"'"'/mnt/disks/cv/detectron2_repo2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __
file__, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
Subprocess check_output returned non-zero exit status 1
The command yum that you launch was executed properly. It returns a non zero status which means that an error occured during the...
Read more >Command works on terminal, but gives a "returned non-zero ...
Command works on terminal, but gives a "returned non-zero exit status 1" when run via python subprocess. How is that possible?
Read more >subprocess — Subprocess management — Python 3.11.1 ...
Subclass of SubprocessError , raised when a process run by check_call() , check_output() , or run() (with check=True ) returns a non-zero exit...
Read more >Command '('lsb_release', '-a')' return non-zero exit status 1 " is ...
The error message "subprocess.CalledProcessError: Command '('lsb_release', '-a')' return non-zero exit status 1 " is displayed during pip3.7.5 installation.
Read more >1936939 – osbs-client fails to build with Python 3.10: E ...
... to build with Python 3.10: E subprocess.CalledProcessError: Command '['git', 'rev-parse', 'HEAD']' returned non-zero exit status 128.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any chance you have gcc but not g++? Normally they should come together though.
Yeah, g++ wasn’t installed. It worked.