谢谢,已经解决权限问题,但是执行后还有如下报错,请问是megconvert的版本问题吗?
WARNING: Disabling all use of wheels due to the use of --build-option / --global-option / --install-option.
Processing /home/fyh/mgeconvert
Preparing metadata (setup.py) … done
Requirement already satisfied: numpy in /home/fyh/.local/lib/python3.8/site-packages (from mgeconvert==0.7.0.dev0) (1.21.4)
Skipping wheel build for mgeconvert, due to binaries being disabled for it.
Installing collected packages: mgeconvert
Running setup.py install for mgeconvert … error
error: subprocess-exited-with-error
× Running setup.py install for mgeconvert did not run successfully.
│ exit code: 1
╰─> [129 lines of output]
/home/fyh/.local/lib/python3.8/site-packages/setuptools/dist.py:493: UserWarning: Normalizing ‘0.7.0dev’ to ‘0.7.0.dev0’
warnings.warn(tmpl.format(**locals()))
running install
/home/fyh/.local/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
copying mgeconvert/init.py -> build/lib.linux-x86_64-3.8/mgeconvert
running egg_info
writing manifest file ‘mgeconvert.egg-info/SOURCES.txt’
running build_ext
Collecting onnx>=1.7.0
Using cached https://files.pythonhosted.org/packages/16/6a/bdae938babb4bc23de7b599439f3d1f1179748385e4ced099f3b4cb646bd/onnx-1.10.2.tar.gz
Requirement already satisfied: numpy>=1.16.6 in /home/fyh/.local/lib/python3.6/site-packages (from onnx>=1.7.0)
Requirement already satisfied: protobuf in /home/fyh/.local/lib/python3.6/site-packages (from onnx>=1.7.0)
Requirement already satisfied: six in /usr/lib/python3.6/site-packages (from onnx>=1.7.0)
Requirement already satisfied: typing-extensions>=3.6.2.1 in /home/fyh/.local/lib/python3.6/site-packages (from onnx>=1.7.0)
Installing collected packages: onnx
Running setup.py install for onnx: started
Running setup.py install for onnx: finished with status ‘error’
Complete output from command /usr/bin/python3 -u -c “import setuptools, tokenize;file=’/tmp/pip-build-0hp01yyd/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-ysk3o284-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
fatal: 不是一个 git 仓库(或者任何父目录):.git
running install
running build
running build_py
running create_version
running cmake_build
Using cmake args: [’/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-x86_64-linux-gnu.so’, ‘-DCMAKE_BUILD_TYPE=Release’, ‘-DONNX_ML=1’, ‘/tmp/pip-build-0hp01yyd/onnx’]
– The C compiler identification is GNU 8.4.1
– The CXX compiler identification is GNU 8.4.1
– 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 PythonInterp: /usr/bin/python3 (found version “3.6.8”)
– Found PythonLibs: /usr/lib64/libpython2.7.so
Generated: /tmp/pip-build-0hp01yyd/onnx/.setuptools-cmake-build/onnx/onnx-ml.proto
CMake Error at CMakeLists.txt:295 (message):
Protobuf compiler not found
Call Stack (most recent call first):
CMakeLists.txt:326 (relative_protobuf_generate_cpp)
-- Configuring incomplete, errors occurred!
See also "/tmp/pip-build-0hp01yyd/onnx/.setuptools-cmake-build/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-0hp01yyd/onnx/setup.py", line 361, in <module>
'backend-test-tools = onnx.backend.test.cmd_tools:main',
File "/usr/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/usr/lib64/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib64/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib64/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/usr/lib64/python3.6/distutils/command/install.py", line 556, in run
self.run_command('build')
File "/usr/lib64/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib64/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib64/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-build-0hp01yyd/onnx/setup.py", line 233, in run
self.run_command('cmake_build')
File "/usr/lib64/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-build-0hp01yyd/onnx/setup.py", line 219, in run
subprocess.check_call(cmake_args)
File "/usr/lib64/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-x86_64-linux-gnu.so', '-DCMAKE_BUILD_TYPE=Release', '-DONNX_ML=1', '/tmp/pip-build-0hp01yyd/onnx']' returned non-zero exit status 1.
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-0hp01yyd/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-ysk3o284-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-0hp01yyd/onnx/
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/home/fyh/mgeconvert/setup.py", line 106, in <module>
setup(
File "/home/fyh/.local/lib/python3.8/site-packages/setuptools/__init__.py", line 155, in setup
return distutils.core.setup(**attrs)
File "/home/fyh/.local/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 148, in setup
return run_commands(dist)
File "/home/fyh/.local/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
dist.run_commands()
File "/home/fyh/.local/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
self.run_command(cmd)
File "/home/fyh/.local/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/home/fyh/mgeconvert/setup.py", line 62, in run
_install.run(self)
File "/home/fyh/.local/lib/python3.8/site-packages/setuptools/command/install.py", line 68, in run
return orig.install.run(self)
File "/home/fyh/.local/lib/python3.8/site-packages/setuptools/_distutils/command/install.py", line 664, in run
self.run_command('build')
File "/home/fyh/.local/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/fyh/.local/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/home/fyh/.local/lib/python3.8/site-packages/setuptools/_distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/home/fyh/.local/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/fyh/.local/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/home/fyh/mgeconvert/setup.py", line 68, in run
self.build_all(self.find_extension(target))
File "/home/fyh/mgeconvert/setup.py", line 80, in build_all
subprocess.check_call(ext.script)
File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'mgeconvert/backend/ir_to_onnx/init.sh' 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: legacy-install-failure
× Encountered error while trying to install package.
╰─> mgeconvert
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.