-
Notifications
You must be signed in to change notification settings - Fork 276
Description
When I run this code, I encounter this error:
Traceback (most recent call last):
File "/opt/conda/envs/fengbo1/lib/python3.8/distutils/unixccompiler.py", line 117, in _compile
self.spawn(compiler_so + cc_args + [src, '-o', obj] +
File "/opt/conda/envs/fengbo1/lib/python3.8/distutils/ccompiler.py", line 910, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/opt/conda/envs/fengbo1/lib/python3.8/distutils/spawn.py", line 36, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
File "/opt/conda/envs/fengbo1/lib/python3.8/distutils/spawn.py", line 157, in _spawn_posix
raise DistutilsExecError(
distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/envs/fengbo1/lib/python3.8/site-packages/pyximport/pyximport.py", line 214, in load_module
so_path = build_module(module_name, pyxfilename, pyxbuild_dir,
File "/opt/conda/envs/fengbo1/lib/python3.8/site-packages/pyximport/pyximport.py", line 186, in build_module
so_path = pyxbuild.pyx_to_dll(pyxfilename, extension_mod,
File "/opt/conda/envs/fengbo1/lib/python3.8/site-packages/pyximport/pyxbuild.py", line 102, in pyx_to_dll
dist.run_commands()
File "/opt/conda/envs/fengbo1/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/opt/conda/envs/fengbo1/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/opt/conda/envs/fengbo1/lib/python3.8/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "/opt/conda/envs/fengbo1/lib/python3.8/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/opt/conda/envs/fengbo1/lib/python3.8/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
_build_ext.build_ext.build_extensions(self)
File "/opt/conda/envs/fengbo1/lib/python3.8/distutils/command/build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "/opt/conda/envs/fengbo1/lib/python3.8/distutils/command/build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "/opt/conda/envs/fengbo1/lib/python3.8/distutils/command/build_ext.py", line 528, in build_extension
objects = self.compiler.compile(sources,
File "/opt/conda/envs/fengbo1/lib/python3.8/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/opt/conda/envs/fengbo1/lib/python3.8/distutils/unixccompiler.py", line 120, in _compile
raise CompileError(msg)
distutils.errors.CompileError: command 'gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 8, in
from yolact_edge.yolact import Yolact
File "/workspace/yolact_edge/yolact.py", line 13, in
from yolact_edge.layers import Detect
File "/workspace/yolact_edge/layers/init.py", line 1, in
from .functions import *
File "/workspace/yolact_edge/layers/functions/init.py", line 1, in
from .detection import Detect
File "/workspace/yolact_edge/layers/functions/detection.py", line 12, in
from yolact_edge.utils.cython_nms import nms as cnms
File "/opt/conda/envs/fengbo1/lib/python3.8/site-packages/pyximport/pyximport.py", line 459, in load_module
module = load_module(fullname, self.path,
File "/opt/conda/envs/fengbo1/lib/python3.8/site-packages/pyximport/pyximport.py", line 231, in load_module
raise exc.with_traceback(tb)
File "/opt/conda/envs/fengbo1/lib/python3.8/site-packages/pyximport/pyximport.py", line 214, in load_module
so_path = build_module(module_name, pyxfilename, pyxbuild_dir,
File "/opt/conda/envs/fengbo1/lib/python3.8/site-packages/pyximport/pyximport.py", line 186, in build_module
so_path = pyxbuild.pyx_to_dll(pyxfilename, extension_mod,
File "/opt/conda/envs/fengbo1/lib/python3.8/site-packages/pyximport/pyxbuild.py", line 102, in pyx_to_dll
dist.run_commands()
File "/opt/conda/envs/fengbo1/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/opt/conda/envs/fengbo1/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/opt/conda/envs/fengbo1/lib/python3.8/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "/opt/conda/envs/fengbo1/lib/python3.8/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/opt/conda/envs/fengbo1/lib/python3.8/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
_build_ext.build_ext.build_extensions(self)
File "/opt/conda/envs/fengbo1/lib/python3.8/distutils/command/build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "/opt/conda/envs/fengbo1/lib/python3.8/distutils/command/build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "/opt/conda/envs/fengbo1/lib/python3.8/distutils/command/build_ext.py", line 528, in build_extension
objects = self.compiler.compile(sources,
File "/opt/conda/envs/fengbo1/lib/python3.8/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/opt/conda/envs/fengbo1/lib/python3.8/distutils/unixccompiler.py", line 120, in _compile
raise CompileError(msg)
ImportError: Building module yolact_edge.utils.cython_nms failed: ["distutils.errors.CompileError: command 'gcc' failed with exit status 1\n"]
I found it is trigger from this code:
"pyximport.install(setup_args={"include_dirs":np.get_include()}, reload_support=True)", in line 11 file "yolact_edge/layers/functions/detections.py"
supplement:I run it in a docker container env, It works well in the container env which is built from the same image run on another Ubuntu20.04(two machines are the same)
Thank you for your reply!!