ifzhang / ByteTrack

[ECCV 2022] ByteTrack: Multi-Object Tracking by Associating Every Detection Box
MIT License
4.84k stars 913 forks source link

setup.py develop fails #24

Open tesorrells opened 3 years ago

tesorrells commented 3 years ago
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/2] c++ -MMD -MF /home/ubuntu/SOUTHCOM/ByteTrack/build/temp.linux-x86_64-3.8/home/ubuntu/SOUTHCOM/ByteTrack/yolox/layers/csrc/vision.o.d -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/ubuntu/SOUTHCOM/ByteTrack/yolox/layers/csrc -I/usr/lib/python3/dist-packages/torch/include -I/usr/lib/python3/dist-packages/torch/include/torch/csrc/api/include -I/usr/lib/python3/dist-packages/torch/include/TH -I/usr/lib/python3/dist-packages/torch/include/THC -I/usr/include/python3.8 -c -c /home/ubuntu/SOUTHCOM/ByteTrack/yolox/layers/csrc/vision.cpp -o /home/ubuntu/SOUTHCOM/ByteTrack/build/temp.linux-x86_64-3.8/home/ubuntu/SOUTHCOM/ByteTrack/yolox/layers/csrc/vision.o -O3 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1013"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=1 -std=c++14
FAILED: /home/ubuntu/SOUTHCOM/ByteTrack/build/temp.linux-x86_64-3.8/home/ubuntu/SOUTHCOM/ByteTrack/yolox/layers/csrc/vision.o 
c++ -MMD -MF /home/ubuntu/SOUTHCOM/ByteTrack/build/temp.linux-x86_64-3.8/home/ubuntu/SOUTHCOM/ByteTrack/yolox/layers/csrc/vision.o.d -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/ubuntu/SOUTHCOM/ByteTrack/yolox/layers/csrc -I/usr/lib/python3/dist-packages/torch/include -I/usr/lib/python3/dist-packages/torch/include/torch/csrc/api/include -I/usr/lib/python3/dist-packages/torch/include/TH -I/usr/lib/python3/dist-packages/torch/include/THC -I/usr/include/python3.8 -c -c /home/ubuntu/SOUTHCOM/ByteTrack/yolox/layers/csrc/vision.cpp -o /home/ubuntu/SOUTHCOM/ByteTrack/build/temp.linux-x86_64-3.8/home/ubuntu/SOUTHCOM/ByteTrack/yolox/layers/csrc/vision.o -O3 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1013"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=1 -std=c++14
In file included from /home/ubuntu/SOUTHCOM/ByteTrack/yolox/layers/csrc/vision.cpp:1:
/home/ubuntu/SOUTHCOM/ByteTrack/yolox/layers/csrc/cocoeval/cocoeval.h:4:10: fatal error: pybind11/numpy.h: No such file or directory
    4 | #include <pybind11/numpy.h>
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
[2/2] c++ -MMD -MF /home/ubuntu/SOUTHCOM/ByteTrack/build/temp.linux-x86_64-3.8/home/ubuntu/SOUTHCOM/ByteTrack/yolox/layers/csrc/cocoeval/cocoeval.o.d -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/ubuntu/SOUTHCOM/ByteTrack/yolox/layers/csrc -I/usr/lib/python3/dist-packages/torch/include -I/usr/lib/python3/dist-packages/torch/include/torch/csrc/api/include -I/usr/lib/python3/dist-packages/torch/include/TH -I/usr/lib/python3/dist-packages/torch/include/THC -I/usr/include/python3.8 -c -c /home/ubuntu/SOUTHCOM/ByteTrack/yolox/layers/csrc/cocoeval/cocoeval.cpp -o /home/ubuntu/SOUTHCOM/ByteTrack/build/temp.linux-x86_64-3.8/home/ubuntu/SOUTHCOM/ByteTrack/yolox/layers/csrc/cocoeval/cocoeval.o -O3 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1013"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=1 -std=c++14
FAILED: /home/ubuntu/SOUTHCOM/ByteTrack/build/temp.linux-x86_64-3.8/home/ubuntu/SOUTHCOM/ByteTrack/yolox/layers/csrc/cocoeval/cocoeval.o 
c++ -MMD -MF /home/ubuntu/SOUTHCOM/ByteTrack/build/temp.linux-x86_64-3.8/home/ubuntu/SOUTHCOM/ByteTrack/yolox/layers/csrc/cocoeval/cocoeval.o.d -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/ubuntu/SOUTHCOM/ByteTrack/yolox/layers/csrc -I/usr/lib/python3/dist-packages/torch/include -I/usr/lib/python3/dist-packages/torch/include/torch/csrc/api/include -I/usr/lib/python3/dist-packages/torch/include/TH -I/usr/lib/python3/dist-packages/torch/include/THC -I/usr/include/python3.8 -c -c /home/ubuntu/SOUTHCOM/ByteTrack/yolox/layers/csrc/cocoeval/cocoeval.cpp -o /home/ubuntu/SOUTHCOM/ByteTrack/build/temp.linux-x86_64-3.8/home/ubuntu/SOUTHCOM/ByteTrack/yolox/layers/csrc/cocoeval/cocoeval.o -O3 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1013"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=1 -std=c++14
In file included from /home/ubuntu/SOUTHCOM/ByteTrack/yolox/layers/csrc/cocoeval/cocoeval.cpp:2:
/home/ubuntu/SOUTHCOM/ByteTrack/yolox/layers/csrc/cocoeval/cocoeval.h:4:10: fatal error: pybind11/numpy.h: No such file or directory
    4 | #include <pybind11/numpy.h>
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/torch/utils/cpp_extension.py", line 1667, in _run_ninja_build
    subprocess.run(
  File "/usr/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "setup.py", line 54, in <module>
    setuptools.setup(
  File "/usr/local/lib/python3.8/dist-packages/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/local/lib/python3.8/dist-packages/setuptools/command/develop.py", line 34, in run
    self.install_for_development()
  File "/usr/local/lib/python3.8/dist-packages/setuptools/command/develop.py", line 136, in install_for_development
    self.run_command('build_ext')
  File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/local/lib/python3.8/dist-packages/setuptools/command/build_ext.py", line 79, in run
    _build_ext.run(self)
  File "/usr/lib/python3/dist-packages/Cython/Distutils/old_build_ext.py", line 186, in run
    _build_ext.build_ext.run(self)
  File "/usr/lib/python3.8/distutils/command/build_ext.py", line 340, in run
    self.build_extensions()
  File "/usr/lib/python3/dist-packages/torch/utils/cpp_extension.py", line 708, in build_extensions
    build_ext.build_extensions(self)
  File "/usr/lib/python3/dist-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
    _build_ext.build_ext.build_extensions(self)
  File "/usr/lib/python3.8/distutils/command/build_ext.py", line 449, in build_extensions
    self._build_extensions_serial()
  File "/usr/lib/python3.8/distutils/command/build_ext.py", line 474, in _build_extensions_serial
    self.build_extension(ext)
  File "/usr/local/lib/python3.8/dist-packages/setuptools/command/build_ext.py", line 196, in build_extension
    _build_ext.build_extension(self, ext)
  File "/usr/lib/python3.8/distutils/command/build_ext.py", line 528, in build_extension
    objects = self.compiler.compile(sources,
  File "/usr/lib/python3/dist-packages/torch/utils/cpp_extension.py", line 529, in unix_wrap_ninja_compile
    _write_ninja_file_and_compile_objects(
  File "/usr/lib/python3/dist-packages/torch/utils/cpp_extension.py", line 1354, in _write_ninja_file_and_compile_objects
    _run_ninja_build(
  File "/usr/lib/python3/dist-packages/torch/utils/cpp_extension.py", line 1683, in _run_ninja_build
    raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension

ls /home/ubuntu/.local/lib/python3.8/site-packages/pybind11/include/pybind11/
attr.h         cast.h         common.h       detail/        embed.h        functional.h   iostream.h     operators.h    pybind11.h     stl/           stl.h          
buffer_info.h  chrono.h       complex.h      eigen.h        eval.h         gil.h          numpy.h        options.h      pytypes.h      stl_bind.h    

It exists so I'm not sure what the problem is besides PATH

lijiajun3029 commented 2 years ago

maybe just type export CXX=$(which g++)