when I execute the below command I am getting below error,
sudo pip3 install onnx==1.4.1
WARNING: The directory '/home/xavier2/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
Collecting onnx==1.4.1
Downloading onnx-1.4.1.tar.gz (2.9 MB)
|████████████████████████████████| 2.9 MB 10.2 MB/s
Preparing metadata (setup.py) ... done
Requirement already satisfied: protobuf in /usr/local/lib/python3.7/dist-packages (from onnx==1.4.1) (3.19.3)
Requirement already satisfied: numpy in /usr/local/lib/python3.7/dist-packages (from onnx==1.4.1) (1.19.4)
Requirement already satisfied: six in /usr/local/lib/python3.7/dist-packages (from onnx==1.4.1) (1.14.0)
Requirement already satisfied: typing>=3.6.4 in /usr/local/lib/python3.7/dist-packages (from onnx==1.4.1) (3.7.4.3)
Requirement already satisfied: typing-extensions>=3.6.2.1 in ./.local/lib/python3.7/site-packages (from onnx==1.4.1) (3.10.0.2)
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 io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-gmp8dzqm/onnx_9ad126445f504d9abe902706c71cb1b1/setup.py'"'"'; __file__='"'"'/tmp/pip-install-gmp8dzqm/onnx_9ad126445f504d9abe902706c71cb1b1/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-yph89h6c
cwd: /tmp/pip-install-gmp8dzqm/onnx_9ad126445f504d9abe902706c71cb1b1/
Complete output (131 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
-- Found Protobuf: /usr/local/lib/libprotobuf.so (found version "3.8.0")
CMake Warning at CMakeLists.txt:356 (find_package):
By not providing "Findpybind11.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "pybind11",
but CMake did not find one.
Could not find a package configuration file provided by "pybind11"
(requested version 2.2) with any of the following names:
pybind11Config.cmake
pybind11-config.cmake
Add the installation prefix of "pybind11" to CMAKE_PREFIX_PATH or set
"pybind11_DIR" to a directory containing one of the above files. If
"pybind11" provides a separate development package or SDK, be sure it has
been installed.
--
-- ******** Summary ********
-- CMake version : 3.19.4
-- CMake command : /usr/local/bin/cmake
-- System : Linux
-- C++ compiler : /usr/bin/c++
-- C++ compiler version : 7.5.0
-- CXX flags : -Wnon-virtual-dtor
-- Build type : Release
-- Compile definitions :
-- CMAKE_PREFIX_PATH :
-- CMAKE_INSTALL_PREFIX : /usr/local
-- CMAKE_MODULE_PATH :
--
-- 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
-- BUILD_ONNX_PYTHON : ON
-- Python version :
-- Python executable : /usr/bin/python3
-- Python includes : /usr/include/python3.7m
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/pip-install-gmp8dzqm/onnx_9ad126445f504d9abe902706c71cb1b1/.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-gmp8dzqm/onnx_9ad126445f504d9abe902706c71cb1b1/onnx/onnx.in.proto
Writing /tmp/pip-install-gmp8dzqm/onnx_9ad126445f504d9abe902706c71cb1b1/.setuptools-cmake-build/onnx/onnx.proto
Writing /tmp/pip-install-gmp8dzqm/onnx_9ad126445f504d9abe902706c71cb1b1/.setuptools-cmake-build/onnx/onnx.proto3
generating /tmp/pip-install-gmp8dzqm/onnx_9ad126445f504d9abe902706c71cb1b1/.setuptools-cmake-build/onnx/onnx_pb.py
[ 7%] Running C++ protocol buffer compiler on /tmp/pip-install-gmp8dzqm/onnx_9ad126445f504d9abe902706c71cb1b1/.setuptools-cmake-build/onnx/onnx.proto
[ 9%] Linking C static library libonnxifi_loader.a
[ 9%] Built target onnxifi_loader
[ 11%] Linking C shared library libonnxifi_dummy.so
/usr/bin/env: ‘python’: No such file or directory
--mypy_out: protoc-gen-mypy: Plugin failed with status code 127.
CMakeFiles/gen_onnx_proto.dir/build.make:80: recipe for target 'onnx/onnx.pb.cc' failed
make[2]: *** [onnx/onnx.pb.cc] Error 1
CMakeFiles/Makefile2:214: 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....
Scanning dependencies of target onnxifi_wrapper
[ 12%] Building C object CMakeFiles/onnxifi_wrapper.dir/onnx/onnxifi_wrapper.c.o
[ 12%] Built target onnxifi_dummy
[ 14%] Linking C shared module libonnxifi.so
[ 14%] Built target onnxifi_wrapper
Makefile:148: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-gmp8dzqm/onnx_9ad126445f504d9abe902706c71cb1b1/setup.py", line 328, in <module>
'backend-test-tools = onnx.backend.test.cmd_tools:main',
File "/usr/local/lib/python3.7/dist-packages/setuptools/__init__.py", line 163, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.7/distutils/dist.py", line 985, 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.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3.7/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-install-gmp8dzqm/onnx_9ad126445f504d9abe902706c71cb1b1/setup.py", line 203, in run
self.run_command('cmake_build')
File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-install-gmp8dzqm/onnx_9ad126445f504d9abe902706c71cb1b1/setup.py", line 197, in run
subprocess.check_call(build_args)
File "/usr/lib/python3.7/subprocess.py", line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/local/bin/cmake', '--build', '.', '--', '-j', '8']' 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
Attempting uninstall: onnx
Found existing installation: onnx 1.10.2
Uninstalling onnx-1.10.2:
Successfully uninstalled onnx-1.10.2
Running setup.py install for onnx ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-gmp8dzqm/onnx_9ad126445f504d9abe902706c71cb1b1/setup.py'"'"'; __file__='"'"'/tmp/pip-install-gmp8dzqm/onnx_9ad126445f504d9abe902706c71cb1b1/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-k_za2yiv/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.7/onnx
cwd: /tmp/pip-install-gmp8dzqm/onnx_9ad126445f504d9abe902706c71cb1b1/
Complete output (103 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 Warning at CMakeLists.txt:356 (find_package):
By not providing "Findpybind11.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "pybind11",
but CMake did not find one.
Could not find a package configuration file provided by "pybind11"
(requested version 2.2) with any of the following names:
pybind11Config.cmake
pybind11-config.cmake
Add the installation prefix of "pybind11" to CMAKE_PREFIX_PATH or set
"pybind11_DIR" to a directory containing one of the above files. If
"pybind11" provides a separate development package or SDK, be sure it has
been installed.
--
-- ******** Summary ********
-- CMake version : 3.19.4
-- CMake command : /usr/local/bin/cmake
-- System : Linux
-- C++ compiler : /usr/bin/c++
-- C++ compiler version : 7.5.0
-- CXX flags : -Wnon-virtual-dtor
-- Build type : Release
-- Compile definitions :
-- CMAKE_PREFIX_PATH :
-- CMAKE_INSTALL_PREFIX : /usr/local
-- CMAKE_MODULE_PATH :
--
-- 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
-- BUILD_ONNX_PYTHON : ON
-- Python version :
-- Python executable : /usr/bin/python3
-- Python includes : /usr/include/python3.7m
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/pip-install-gmp8dzqm/onnx_9ad126445f504d9abe902706c71cb1b1/.setuptools-cmake-build
[ 3%] Running C++ protocol buffer compiler on /tmp/pip-install-gmp8dzqm/onnx_9ad126445f504d9abe902706c71cb1b1/.setuptools-cmake-build/onnx/onnx.proto
[ 5%] Built target onnxifi_dummy
[ 9%] Built target onnxifi_loader
[ 12%] Built target onnxifi_wrapper
/usr/bin/env: ‘python’: No such file or directory
--mypy_out: protoc-gen-mypy: Plugin failed with status code 127.
CMakeFiles/gen_onnx_proto.dir/build.make:80: recipe for target 'onnx/onnx.pb.cc' failed
make[2]: *** [onnx/onnx.pb.cc] Error 1
CMakeFiles/Makefile2:214: recipe for target 'CMakeFiles/gen_onnx_proto.dir/all' failed
make[1]: *** [CMakeFiles/gen_onnx_proto.dir/all] Error 2
Makefile:148: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-gmp8dzqm/onnx_9ad126445f504d9abe902706c71cb1b1/setup.py", line 328, in <module>
'backend-test-tools = onnx.backend.test.cmd_tools:main',
File "/usr/local/lib/python3.7/dist-packages/setuptools/__init__.py", line 163, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.7/dist-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/usr/lib/python3.7/distutils/command/install.py", line 589, in run
self.run_command('build')
File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3.7/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-install-gmp8dzqm/onnx_9ad126445f504d9abe902706c71cb1b1/setup.py", line 203, in run
self.run_command('cmake_build')
File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-install-gmp8dzqm/onnx_9ad126445f504d9abe902706c71cb1b1/setup.py", line 197, in run
subprocess.check_call(build_args)
File "/usr/lib/python3.7/subprocess.py", line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/local/bin/cmake', '--build', '.', '--', '-j', '8']' returned non-zero exit status 2.
----------------------------------------
Rolling back uninstall of onnx
Moving to /home/xavier2/.local/bin/backend-test-tools
from /tmp/pip-uninstall-e0rovw33/backend-test-tools
Moving to /home/xavier2/.local/bin/check-model
from /tmp/pip-uninstall-e0rovw33/check-model
Moving to /home/xavier2/.local/bin/check-node
from /tmp/pip-uninstall-e0rovw33/check-node
Moving to /home/xavier2/.local/lib/python3.7/site-packages/onnx-1.10.2.dist-info/
from /home/xavier2/.local/lib/python3.7/site-packages/~nnx-1.10.2.dist-info
Moving to /home/xavier2/.local/lib/python3.7/site-packages/onnx/
from /home/xavier2/.local/lib/python3.7/site-packages/~nnx
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-gmp8dzqm/onnx_9ad126445f504d9abe902706c71cb1b1/setup.py'"'"'; __file__='"'"'/tmp/pip-install-gmp8dzqm/onnx_9ad126445f504d9abe902706c71cb1b1/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-k_za2yiv/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.7/onnx Check the logs for full command output.
when I execute the below command I am getting below error,
Please Advice