ByteTrack
ByteTrack copied to clipboard
error: subprocess-exited-with-error Building wheel for onnx (pyproject.toml) did not run successfully.
Ubuntu 22.04
Collecting oauthlib>=3.0.0 (from requests-oauthlib>=0.7.0->google-auth-oauthlib<1.1,>=0.5->tensorboard->-r requirements.txt (line 13))
Using cached oauthlib-3.2.2-py3-none-any.whl (151 kB)
Building wheels for collected packages: onnx, onnx-simplifier, lap, filterpy
Building wheel for onnx (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for onnx (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [94 lines of output]
fatal: не найден git репозиторий (или один из родительских каталогов): .git
/tmp/pip-build-env-82rfe9_d/overlay/lib/python3.10/site-packages/setuptools/dist.py:745: SetuptoolsDeprecationWarning: Invalid dash-separated options
!!
********************************************************************************
Usage of dash-separated 'license-file' will not be supported in future
versions. Please use the underscore name 'license_file' instead.
By 2023-Sep-26, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
********************************************************************************
!!
opt = self.warn_dash_deprecation(opt, section)
/tmp/pip-build-env-82rfe9_d/overlay/lib/python3.10/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
!!
********************************************************************************
The license_file parameter is deprecated, use license_files instead.
By 2023-Oct-30, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
********************************************************************************
!!
parsed = self.parsers.get(option_name, lambda x: x)(value)
running bdist_wheel
running build
running build_py
running create_version
running cmake_build
Traceback (most recent call last):
File "/home/nikita/VS_Code_Projects/Test_project/venv/bin/cmake", line 5, in <module>
from cmake import cmake
ModuleNotFoundError: No module named 'cmake'
Traceback (most recent call last):
File "/home/nikita/VS_Code_Projects/Test_project/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/home/nikita/VS_Code_Projects/Test_project/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/nikita/VS_Code_Projects/Test_project/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/tmp/pip-build-env-82rfe9_d/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 416, in build_wheel
return self._build_with_temp_dir(['bdist_wheel'], '.whl',
File "/tmp/pip-build-env-82rfe9_d/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 401, in _build_with_temp_dir
self.run_setup()
File "/tmp/pip-build-env-82rfe9_d/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 487, in run_setup
super(_BuildMetaLegacyBackend,
File "/tmp/pip-build-env-82rfe9_d/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in run_setup
exec(code, locals())
File "<string>", line 321, in <module>
File "/tmp/pip-build-env-82rfe9_d/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 107, in setup
return distutils.core.setup(**attrs)
File "/tmp/pip-build-env-82rfe9_d/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
File "/tmp/pip-build-env-82rfe9_d/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/tmp/pip-build-env-82rfe9_d/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/tmp/pip-build-env-82rfe9_d/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1234, in run_command
super().run_command(command)
File "/tmp/pip-build-env-82rfe9_d/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-82rfe9_d/overlay/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 343, in run
self.run_command("build")
File "/tmp/pip-build-env-82rfe9_d/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/tmp/pip-build-env-82rfe9_d/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1234, in run_command
super().run_command(command)
File "/tmp/pip-build-env-82rfe9_d/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-82rfe9_d/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 131, in run
self.run_command(cmd_name)
File "/tmp/pip-build-env-82rfe9_d/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/tmp/pip-build-env-82rfe9_d/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1234, in run_command
super().run_command(command)
File "/tmp/pip-build-env-82rfe9_d/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "<string>", line 217, in run
File "/tmp/pip-build-env-82rfe9_d/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/tmp/pip-build-env-82rfe9_d/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1234, in run_command
super().run_command(command)
File "/tmp/pip-build-env-82rfe9_d/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "<string>", line 203, in run
File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/nikita/VS_Code_Projects/Test_project/venv/bin/cmake', '-DPYTHON_INCLUDE_DIR=/usr/include/python3.10', '-DPYTHON_EXECUTABLE=/home/nikita/VS_Code_Projects/Test_project/venv/bin/python3', '-DBUILD_ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cpython-310-x86_64-linux-gnu.so', '-DCMAKE_BUILD_TYPE=Release', '-DONNX_ML=1', '/tmp/pip-install-v_ncz740/onnx_ea6ea55ed9cf42d29820fbbe47dc7cbb']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for onnx
Building wheel for onnx-simplifier (setup.py) ... done
Created wheel for onnx-simplifier: filename=onnx_simplifier-0.3.5-py3-none-any.whl size=12863 sha256=7f42a80a7579e8a2c1596c3f8c1f57a0dfee76c490580dd6c51b010a54e0574a
Stored in directory: /home/nikita/.cache/pip/wheels/80/c8/37/3add8c73aa2604e2a17d2f8836fab2b889a931c028bfa57a33
Building wheel for lap (setup.py) ... done
Created wheel for lap: filename=lap-0.4.0-cp310-cp310-linux_x86_64.whl size=1628965 sha256=236ec8ef30e584c48c50eda1b23d56b142d2b63b64d3b6fa23730a083b202c36
Stored in directory: /home/nikita/.cache/pip/wheels/00/42/2e/9dfe19270eea279d79e84767ff0d7b8082c3bf776cad00e83d
Building wheel for filterpy (setup.py) ... done
Created wheel for filterpy: filename=filterpy-1.4.5-py3-none-any.whl size=110459 sha256=6d657ff0591bd39e31342ab48228ddd01d9226dab2babedb6a9532e8f4daa377
Stored in directory: /home/nikita/.cache/pip/wheels/0f/0c/ea/218f266af4ad626897562199fbbcba521b8497303200186102
Successfully built onnx-simplifier lap filterpy
Failed to build onnx
Change these dependencies.
!sed -i 's/onnx==1.8.1/onnx==1.13.0/g' requirements.txt !sed -i 's/onnxruntime==1.8.0/onnxruntime==1.13.1/g' requirements.txt
One thing I did is creating a function like such:
def replaceVersionedLibraryForGenericVersion(requirementsFilePath, libraryName) -> None:
requirementsFile = open(requirementsFilePath, "r")
editedRequirementsText = []
libCheckString = libraryName + "=="
for line in requirementsFile:
if libCheckString in line:
editedRequirementsText.append(libraryName + "\n")
else:
editedRequirementsText.append(line)
requirementsFile.close()
newRequirementsFile = open(requirementsFilePath, "w")
newRequirementsFile.writelines(editedRequirementsText)
newRequirementsFile.close()
And then you just have to call
replaceVersionedLibraryForGenericVersion("ByteTrack/requirements.txt", "onnx")
replaceVersionedLibraryForGenericVersion("ByteTrack/requirements.txt", "onnxruntime")
Right after you clone the repo
It is not a great fix and ideally those requirement versions should be updated, but this will allow your cells to continue running without extra manual steps.