Collecting onnx==1.4.1
Using cached onnx-1.4.1.tar.gz (2.9 MB)
Collecting numpy
Downloading numpy-1.19.5-cp36-cp36m-manylinux2014_aarch64.whl (12.4 MB)
|################################| 12.4 MB 8.1 MB/s
Collecting protobuf
Using cached protobuf-3.15.6-py2.py3-none-any.whl (173 kB)
Requirement already satisfied: six in /usr/local/lib/python3.6/dist-packages (from onnx==1.4.1) (1.15.0)
Requirement already satisfied: typing-extensions>=3.6.2.1 in /usr/local/lib/python3.6/dist-packages (from onnx==1.4.1) (3.7.4.3)
Collecting typing>=3.6.4
Using cached typing-3.7.4.3.tar.gz (78 kB)
Building wheels for collected packages: onnx, typing
Building wheel for onnx (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-j2olh8er/onnx_1a18955d9ba049a49ea50b7cb848657b/setup.py'"'"'; __file__='"'"'/tmp/pip-install-j2olh8er/onnx_1a18955d9ba049a49ea50b7cb848657b/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-umvfcvmx
cwd: /tmp/pip-install-j2olh8er/onnx_1a18955d9ba049a49ea50b7cb848657b/
Complete output (45 lines):
fatal: not a git repository (or any of the parent directories): .git
running bdist_wheel
running build
running build_py
running create_version
running cmake_build
Traceback (most recent call last):
File "/usr/local/bin/cmake", line 5, in <module>
from cmake import cmake
ModuleNotFoundError: No module named 'cmake'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-j2olh8er/onnx_1a18955d9ba049a49ea50b7cb848657b/setup.py", line 328, in <module>
'backend-test-tools = onnx.backend.test.cmd_tools:main',
File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 204, in run
self.run_command('build')
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-install-j2olh8er/onnx_1a18955d9ba049a49ea50b7cb848657b/setup.py", line 203, in run
self.run_command('cmake_build')
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-install-j2olh8er/onnx_1a18955d9ba049a49ea50b7cb848657b/setup.py", line 190, in run
subprocess.check_call(cmake_args)
File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/local/bin/cmake', '-DPYTHON_INCLUDE_DIR=/usr/include/python3.6m', '-DPYTHON_EXECUTABLE=/usr/bin/python3', '-DBUILD_ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cpython-36m-aarch64-linux-gnu.so', '/tmp/pip-install-j2olh8er/onnx_1a18955d9ba049a49ea50b7cb848657b']' returned non-zero exit status 1.
----------------------------------------
ERROR: Failed building wheel for onnx
Running setup.py clean for onnx
Building wheel for typing (setup.py) ... done
Created wheel for typing: filename=typing-3.7.4.3-py3-none-any.whl size=28017 sha256=84e3299d899c6db1d5d8cf7234d92d51182687f5d2fcc2db0b2bd59ac7f25808
Stored in directory: /root/.cache/pip/wheels/5f/63/c2/b85489bbea28cb5d36cfe197244f898428004fa3caa7a23116
Successfully built typing
Failed to build onnx
Installing collected packages: typing, protobuf, numpy, onnx
Running setup.py install for onnx ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-j2olh8er/onnx_1a18955d9ba049a49ea50b7cb848657b/setup.py'"'"'; __file__='"'"'/tmp/pip-install-j2olh8er/onnx_1a18955d9ba049a49ea50b7cb848657b/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-739w5b6e/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6/onnx
cwd: /tmp/pip-install-j2olh8er/onnx_1a18955d9ba049a49ea50b7cb848657b/
Complete output (47 lines):
fatal: not a git repository (or any of the parent directories): .git
running install
running build
running build_py
running create_version
running cmake_build
Traceback (most recent call last):
File "/usr/local/bin/cmake", line 5, in <module>
from cmake import cmake
ModuleNotFoundError: No module named 'cmake'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-j2olh8er/onnx_1a18955d9ba049a49ea50b7cb848657b/setup.py", line 328, in <module>
'backend-test-tools = onnx.backend.test.cmd_tools:main',
File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/usr/lib/python3.6/distutils/command/install.py", line 589, in run
self.run_command('build')
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-install-j2olh8er/onnx_1a18955d9ba049a49ea50b7cb848657b/setup.py", line 203, in run
self.run_command('cmake_build')
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-install-j2olh8er/onnx_1a18955d9ba049a49ea50b7cb848657b/setup.py", line 190, in run
subprocess.check_call(cmake_args)
File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/local/bin/cmake', '-DPYTHON_INCLUDE_DIR=/usr/include/python3.6m', '-DPYTHON_EXECUTABLE=/usr/bin/python3', '-DBUILD_ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cpython-36m-aarch64-linux-gnu.so', '/tmp/pip-install-j2olh8er/onnx_1a18955d9ba049a49ea50b7cb848657b']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-j2olh8er/onnx_1a18955d9ba049a49ea50b7cb848657b/setup.py'"'"'; __file__='"'"'/tmp/pip-install-j2olh8er/onnx_1a18955d9ba049a49ea50b7cb848657b/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-739w5b6e/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6/onnx Check the logs for full command output.
Hi @Myron, have you installed cmake with sudo apt-get install cmake
?
If that doesn’t fix, also try pip3 install cmake
Hi @dusty_nv . I tried that already but the issue still remains the same.
Using cached cmake-3.18.4.post1-py3-none-manylinux2014_aarch64.whl (16.1 MB)
Installing collected packages: cmake
Successfully installed cmake-3.18.4.post1
root@dnncam-0000681:/opt/nvidia/deepstream/deepstream-5.0.1/tensorrt_demos# pip3 install onnx==1.4.1 Collecting onnx==1.4.1
Using cached onnx-1.4.1.tar.gz (2.9 MB)
Requirement already satisfied: numpy in /usr/local/lib/python3.6/dist-packages (from onnx==1.4.1) (1.19.5)
Requirement already satisfied: protobuf in /usr/local/lib/python3.6/dist-packages (from onnx==1.4.1) (3.15.6)
Requirement already satisfied: six in /usr/local/lib/python3.6/dist-packages (from onnx==1.4.1) (1.15.0)
Requirement already satisfied: typing-extensions>=3.6.2.1 in /usr/local/lib/python3.6/dist-packages (from onnx ==1.4.1) (3.7.4.3)
Requirement already satisfied: typing>=3.6.4 in /usr/local/lib/python3.6/dist-packages (from onnx==1.4.1) (3.7 .4.3)
Building wheels for collected packages: onnx
Building wheel for onnx (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-tu3d 978y/onnx_aadaf9d9f6e449a7b9d4d1d14d236b83/setup.py'"'"'; __file__='"'"'/tmp/pip-install-tu3d978y/onnx_aadaf9d 9f6e449a7b9d4d1d14d236b83/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().repl ace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp /pip-wheel-rubn_8g6
cwd: /tmp/pip-install-tu3d978y/onnx_aadaf9d9f6e449a7b9d4d1d14d236b83/
Complete output (65 lines):
fatal: not a git repository (or any of the parent directories): .git
running bdist_wheel
running build
running build_py
running create_version
running cmake_build
-- Build type not set - defaulting to Release
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /usr/local/lib/python3.6/dist-packages/cmake/data/share/cmake-3.18/Modules/FindPackageHandleS tandardArgs.cmake:165 (message):
Could NOT find Protobuf (missing: Protobuf_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/local/lib/python3.6/dist-packages/cmake/data/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.c make:458 (_FPHSA_FAILURE_MESSAGE)
/usr/local/lib/python3.6/dist-packages/cmake/data/share/cmake-3.18/Modules/FindProtobuf.cmake:626 (FIND_PA CKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:104 (find_package)
-- Configuring incomplete, errors occurred!
See also "/tmp/pip-install-tu3d978y/onnx_aadaf9d9f6e449a7b9d4d1d14d236b83/.setuptools-cmake-build/CMakeFiles /CMakeOutput.log".
See also "/tmp/pip-install-tu3d978y/onnx_aadaf9d9f6e449a7b9d4d1d14d236b83/.setuptools-cmake-build/CMakeFiles /CMakeError.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-tu3d978y/onnx_aadaf9d9f6e449a7b9d4d1d14d236b83/setup.py", line 328, in <module>
'backend-test-tools = onnx.backend.test.cmd_tools:main',
File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 204, in run
self.run_command('build')
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-install-tu3d978y/onnx_aadaf9d9f6e449a7b9d4d1d14d236b83/setup.py", line 203, in run
self.run_command('cmake_build')
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-install-tu3d978y/onnx_aadaf9d9f6e449a7b9d4d1d14d236b83/setup.py", line 190, in run
subprocess.check_call(cmake_args)
File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/local/bin/cmake', '-DPYTHON_INCLUDE_DIR=/usr/include/python3. 6m', '-DPYTHON_EXECUTABLE=/usr/bin/python3', '-DBUILD_ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', ' -DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cpython-36m-aarch64-linux-gnu.so', '/tmp/pip-install-tu3d978y/onnx_a adaf9d9f6e449a7b9d4d1d14d236b83']' returned non-zero exit status 1.
----------------------------------------
ERROR: Failed building wheel for onnx
Running setup.py clean for onnx
Failed to build onnx
Installing collected packages: onnx
Running setup.py install for onnx ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-tu 3d978y/onnx_aadaf9d9f6e449a7b9d4d1d14d236b83/setup.py'"'"'; __file__='"'"'/tmp/pip-install-tu3d978y/onnx_aadaf 9d9f6e449a7b9d4d1d14d236b83/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().re place('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-_bxbua8p/install-record.txt --single-version-externally-managed --compile --install-headers /u sr/local/include/python3.6/onnx
cwd: /tmp/pip-install-tu3d978y/onnx_aadaf9d9f6e449a7b9d4d1d14d236b83/
Complete output (54 lines):
fatal: not a git repository (or any of the parent directories): .git
running install
running build
running build_py
running create_version
running cmake_build
CMake Error at /usr/local/lib/python3.6/dist-packages/cmake/data/share/cmake-3.18/Modules/FindPackageHandl eStandardArgs.cmake:165 (message):
Could NOT find Protobuf (missing: Protobuf_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/local/lib/python3.6/dist-packages/cmake/data/share/cmake-3.18/Modules/FindPackageHandleStandardArgs .cmake:458 (_FPHSA_FAILURE_MESSAGE)
/usr/local/lib/python3.6/dist-packages/cmake/data/share/cmake-3.18/Modules/FindProtobuf.cmake:626 (FIND_ PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:104 (find_package)
-- Configuring incomplete, errors occurred!
See also "/tmp/pip-install-tu3d978y/onnx_aadaf9d9f6e449a7b9d4d1d14d236b83/.setuptools-cmake-build/CMakeFil es/CMakeOutput.log".
See also "/tmp/pip-install-tu3d978y/onnx_aadaf9d9f6e449a7b9d4d1d14d236b83/.setuptools-cmake-build/CMakeFil es/CMakeError.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-tu3d978y/onnx_aadaf9d9f6e449a7b9d4d1d14d236b83/setup.py", line 328, in <module>
'backend-test-tools = onnx.backend.test.cmd_tools:main',
File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/usr/lib/python3.6/distutils/command/install.py", line 589, in run
self.run_command('build')
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-install-tu3d978y/onnx_aadaf9d9f6e449a7b9d4d1d14d236b83/setup.py", line 203, in run
self.run_command('cmake_build')
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-install-tu3d978y/onnx_aadaf9d9f6e449a7b9d4d1d14d236b83/setup.py", line 190, in run
subprocess.check_call(cmake_args)
File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/local/bin/cmake', '-DPYTHON_INCLUDE_DIR=/usr/include/python 3.6m', '-DPYTHON_EXECUTABLE=/usr/bin/python3', '-DBUILD_ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cpython-36m-aarch64-linux-gnu.so', '/tmp/pip-install-tu3d978y/onnx _aadaf9d9f6e449a7b9d4d1d14d236b83']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.a rgv[0] = '"'"'/tmp/pip-install-tu3d978y/onnx_aadaf9d9f6e449a7b9d4d1d14d236b83/setup.py'"'"'; __file__='"'"'/tm p/pip-install-tu3d978y/onnx_aadaf9d9f6e449a7b9d4d1d14d236b83/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '" '"'exec'"'"'))' install --record /tmp/pip-record-_bxbua8p/install-record.txt --single-version-externally-manag ed --compile --install-headers /usr/local/include/python3.6/onnx Check the logs for full command output.
Hi,
It seems that you don’t have protobuf library in your environment.
Could you install it and try it again?
$ sudo apt-get install libprotobuf-dev protobuf-compiler
Thanks.
hi @AastaLLL , I tried this But the error still remains the same.
I am actually using the following docker image.
deepstream 5.0.1-20.09-base
Hi,
We can install ONNX v1.4.1 with the following instructions:
$ apt update
$ apt-get install python3-pip
$ apt-get install cmake libprotobuf-dev protobuf-compiler
$ pip3 install Cython
$ pip3 install onnx==1.4.1
Please give it a try.
Thanks.
hi @AastaLLL , I did try this but still no success. When I try and install ONNX on JETSON TX2 Platform without docker image , everything installs successfully but in the docker it fails to install.
Any thoughts?