Hey guys,
could anyone help me,
trying to install onnx on jetson nano and after using: pip install onnx
i got the next errors:
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-40juttb4/onnx/setup.py’“'”‘; file=’“'”‘/tmp/pip-install-40juttb4/onnx/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-2igdvv_2
cwd: /tmp/pip-install-40juttb4/onnx/
Complete output (122 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.4.0
– The CXX compiler identification is GNU 7.4.0
– Check for working C compiler: /usr/bin/cc
– Check for working C compiler: /usr/bin/cc – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– Check for working CXX compiler: /usr/bin/c++
– Check for working CXX compiler: /usr/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
– Looking for pthread.h
– Looking for pthread.h - found
– Looking for pthread_create
– Looking for pthread_create - not found
– Looking for pthread_create in pthreads
– Looking for pthread_create in pthreads - not found
– Looking for pthread_create in pthread
– Looking for pthread_create in pthread - found
– Found Threads: TRUE
– Found Protobuf: /usr/local/lib/libprotobuf.so;-lpthread (found version “3.11.2”)
– Found PythonInterp: /usr/bin/python3 (found version “3.6.9”)
– Found PythonLibs: /usr/lib/aarch64-linux-gnu/libpython3.6m.so
– ******** Summary ********
– CMake version : 3.10.2
– CMake command : /usr/bin/cmake
– System : Linux
– C++ compiler : /usr/bin/c++
– C++ compiler version : 7.4.0
– CXX flags : -Wnon-virtual-dtor
– Build type : Release
– Compile definitions :
– CMAKE_PREFIX_PATH :
– CMAKE_INSTALL_PREFIX : /usr/local
– CMAKE_MODULE_PATH : /usr/local/share/cmake/pybind11
– ONNX version : 1.4.1
– ONNX NAMESPACE : onnx
– ONNX_BUILD_TESTS : OFF
– ONNX_BUILD_BENCHMARKS : OFF
– ONNX_USE_LITE_PROTO : OFF
– ONNXIFI_DUMMY_BACKEND : OFF
– Protobuf compiler : /usr/local/bin/protoc
– Protobuf includes : /usr/local/include
– Protobuf libraries : /usr/local/lib/libprotobuf.so;-lpthread
– BUILD_ONNX_PYTHON : ON
– Python version :
– Python executable : /usr/bin/python3
– Python includes : /usr/include/python3.6m
– Configuring done
– Generating done
– Build files have been written to: /tmp/pip-install-40juttb4/onnx/.setuptools-cmake-build
Scanning dependencies of target gen_onnx_proto
Scanning dependencies of target onnxifi_dummy
Scanning dependencies of target onnxifi_loader
[ 3%] Running gen_proto.py on onnx/onnx.in.proto
[ 3%] Building C object CMakeFiles/onnxifi_dummy.dir/onnx/onnxifi_dummy.c.o
[ 5%] Building C object CMakeFiles/onnxifi_loader.dir/onnx/onnxifi_loader.c.o
Processing /tmp/pip-install-40juttb4/onnx/onnx/onnx.in.proto
Writing /tmp/pip-install-40juttb4/onnx/.setuptools-cmake-build/onnx/onnx.proto
Writing /tmp/pip-install-40juttb4/onnx/.setuptools-cmake-build/onnx/onnx.proto3
generating /tmp/pip-install-40juttb4/onnx/.setuptools-cmake-build/onnx/onnx_pb.py
[ 7%] Linking C static library libonnxifi_loader.a
[ 9%] Running C++ protocol buffer compiler on /tmp/pip-install-40juttb4/onnx/.setuptools-cmake-build/onnx/onnx.proto
[ 11%] Linking C shared library libonnxifi_dummy.so
–python_out: onnx/onnx.proto: Unknown generator option: dllexport_decl
CMakeFiles/gen_onnx_proto.dir/build.make:61: recipe for target ‘onnx/onnx.pb.cc’ failed
make[2]: *** [onnx/onnx.pb.cc] Error 1
CMakeFiles/Makefile2:210: recipe for target ‘CMakeFiles/gen_onnx_proto.dir/all’ failed
make[1]: *** [CMakeFiles/gen_onnx_proto.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
[ 11%] Built target onnxifi_loader
[ 11%] Built target onnxifi_dummy
Makefile:129: recipe for target ‘all’ failed
make: *** [all] Error 2
Traceback (most recent call last):
File “”, line 1, in
File “/tmp/pip-install-40juttb4/onnx/setup.py”, line 328, in
‘backend-test-tools = onnx.backend.test.cmd_tools:main’,
File “/usr/local/lib/python3.6/dist-packages/setuptools/init.py”, line 145, 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/local/lib/python3.6/dist-packages/wheel/bdist_wheel.py”, line 192, 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-40juttb4/onnx/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-40juttb4/onnx/setup.py”, line 197, in run
subprocess.check_call(build_args)
File “/usr/lib/python3.6/subprocess.py”, line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[’/usr/bin/cmake’, ‘–build’, ‘.’, ‘–’, ‘-j’, ‘4’]’ returned non-zero exit status 2.
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-40juttb4/onnx/setup.py’“'”‘; file=’“'”‘/tmp/pip-install-40juttb4/onnx/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-h831p_pe/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/kamil/.local/include/python3.6m/onnx
cwd: /tmp/pip-install-40juttb4/onnx/
Complete output (89 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
–
– ******** Summary ********
– CMake version : 3.10.2
– CMake command : /usr/bin/cmake
– System : Linux
– C++ compiler : /usr/bin/c++
– C++ compiler version : 7.4.0
– CXX flags : -Wnon-virtual-dtor
– Build type : Release
– Compile definitions :
– CMAKE_PREFIX_PATH :
– CMAKE_INSTALL_PREFIX : /usr/local
– CMAKE_MODULE_PATH : /usr/local/share/cmake/pybind11
–
– ONNX version : 1.4.1
– ONNX NAMESPACE : onnx
– ONNX_BUILD_TESTS : OFF
– ONNX_BUILD_BENCHMARKS : OFF
– ONNX_USE_LITE_PROTO : OFF
– ONNXIFI_DUMMY_BACKEND : OFF
–
– Protobuf compiler : /usr/local/bin/protoc
– Protobuf includes : /usr/local/include
– Protobuf libraries : /usr/local/lib/libprotobuf.so;-lpthread
– BUILD_ONNX_PYTHON : ON
– Python version :
– Python executable : /usr/bin/python3
– Python includes : /usr/include/python3.6m
– Configuring done
– Generating done
– Build files have been written to: /tmp/pip-install-40juttb4/onnx/.setuptools-cmake-build
[ 5%] Running C++ protocol buffer compiler on /tmp/pip-install-40juttb4/onnx/.setuptools-cmake-build/onnx/onnx.proto
[ 5%] Built target onnxifi_dummy
[ 9%] Built target onnxifi_loader
Scanning dependencies of target onnxifi_wrapper
–python_out: onnx/onnx.proto: Unknown generator option: dllexport_decl
CMakeFiles/gen_onnx_proto.dir/build.make:61: recipe for target ‘onnx/onnx.pb.cc’ failed
make[2]: *** [onnx/onnx.pb.cc] Error 1
CMakeFiles/Makefile2:210: recipe for target ‘CMakeFiles/gen_onnx_proto.dir/all’ failed
make[1]: *** [CMakeFiles/gen_onnx_proto.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
[ 11%] Building C object CMakeFiles/onnxifi_wrapper.dir/onnx/onnxifi_wrapper.c.o
[ 12%] Linking C shared module libonnxifi.so
[ 12%] Built target onnxifi_wrapper
Makefile:129: recipe for target ‘all’ failed
make: *** [all] Error 2
Traceback (most recent call last):
File “”, line 1, in
File “/tmp/pip-install-40juttb4/onnx/setup.py”, line 328, in
‘backend-test-tools = onnx.backend.test.cmd_tools:main’,
File “/usr/local/lib/python3.6/dist-packages/setuptools/init.py”, line 145, 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/local/lib/python3.6/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-40juttb4/onnx/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-40juttb4/onnx/setup.py”, line 197, in run
subprocess.check_call(build_args)
File “/usr/lib/python3.6/subprocess.py”, line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[’/usr/bin/cmake’, ‘–build’, ‘.’, ‘–’, ‘-j’, ‘4’]’ returned non-zero exit status 2.
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '”‘"’/tmp/pip-install-40juttb4/onnx/setup.py’“'”‘; file=’“'”‘/tmp/pip-install-40juttb4/onnx/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-h831p_pe/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/kamil/.local/include/python3.6m/onnx Check the logs for full command output.
k
was trying to install it with sudo or pip3 or older version like 1.4.1 and it’s not working
any help please?
i am trying to run the example about yolo