安装 paddlehub 和 onnx 失败
failed in installing paddlehub and onnx
我的电脑系统是Windows10,
python版本为3.10.2,
pip 版本是 22.1.
我在 cmd.exe 中尝试“pip install paddlehub”,但在最后提示时失败了:
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for onnx
Failed to build onnx
ERROR: Could not build wheels for onnx, which is required to install pyproject.toml-based projects
onnx 的堆栈?
我能有什么建议吗?
试了google一些关键字2天了,'cmake','GCC'等,还是没法解决。
谢谢你的时间。
这是 cmd 中的全部失败日志。
Building wheels for collected packages: onnx
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: not a git repository (or any of the parent directories): .git
C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\dist.py:772: UserWarning: Usage of dash-separated 'license-file' will not be supported in future versions. Please use the underscore name 'license_file' instead
warnings.warn(
C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\config\setupcfg.py:459: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
warnings.warn(msg, warning_class)
running bdist_wheel
running build
running build_py
running create_version
running cmake_build
Using cmake args: ['C:\Program Files\CMake\bin\cmake.exe', '-DPYTHON_INCLUDE_DIR=C:\Users\YI\AppData\Local\Programs\Python\Python310\include', '-DPYTHON_EXECUTABLE=C:\Users\YI\AppData\Local\Programs\Python\Python310\python.exe', '-DBUILD_ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cp310-win_amd64.pyd', '-DCMAKE_BUILD_TYPE=Release', '-DPY_VERSION=3.10', '-DONNX_USE_MSVC_STATIC_RUNTIME=ON', '-A', 'x64', '-T', 'host=x64', '-DONNX_ML=1', 'C:\Users\YI\AppData\Local\Temp\pip-install-7jfedea1\onnx_9f6dd7ae807b48cdb3af1e3d5618d72e']
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19044.
-- The C compiler identification is MSVC 19.23.28106.4
-- The CXX compiler identification is MSVC 19.23.28106.4
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: D:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe - 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: D:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: C:/Users/YI/AppData/Local/Programs/Python/Python310/python.exe (found suitable version "3.10.2", minimum required is "3.10")
-- Found PythonLibs: C:/Users/YI/AppData/Local/Programs/Python/Python310/libs/python310.lib (found suitable version "3.10.2", minimum required is "3.10")
Generated: C:/Users/YI/AppData/Local/Temp/pip-install-7jfedea1/onnx_9f6dd7ae807b48cdb3af1e3d5618d72e/.setuptools-cmake-build/onnx/onnx-ml.proto
CMake Error at CMakeLists.txt:292 (message):
Protobuf compiler not found
Call Stack (most recent call first):
CMakeLists.txt:323 (relative_protobuf_generate_cpp)
-- Configuring incomplete, errors occurred!
See also "C:/Users/YI/AppData/Local/Temp/pip-install-7jfedea1/onnx_9f6dd7ae807b48cdb3af1e3d5618d72e/.setuptools-cmake-build/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "C:\Users\YI\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module>
main()
File "C:\Users\YI\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\YI\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 261, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\build_meta.py", line 244, in build_wheel
return self._build_with_temp_dir(['bdist_wheel'], '.whl',
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\build_meta.py", line 229, in _build_with_temp_dir
self.run_setup()
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\build_meta.py", line 281, in run_setup
super(_BuildMetaLegacyBackend,
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\build_meta.py", line 174, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 337, in <module>
setuptools.setup(
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 148, in setup
return run_commands(dist)
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 163, in run_commands
dist.run_commands()
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 967, in run_commands
self.run_command(cmd)
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\dist.py", line 1229, in run_command
super().run_command(command)
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 986, in run_command
cmd_obj.run()
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\wheel\bdist_wheel.py", line 299, in run
self.run_command('build')
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\dist.py", line 1229, in run_command
super().run_command(command)
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 986, in run_command
cmd_obj.run()
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\_distutils\command\build.py", line 136, in run
self.run_command(cmd_name)
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\dist.py", line 1229, in run_command
super().run_command(command)
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 986, in run_command
cmd_obj.run()
File "setup.py", line 233, in run
self.run_command('cmake_build')
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\dist.py", line 1229, in run_command
super().run_command(command)
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 986, in run_command
cmd_obj.run()
File "setup.py", line 219, in run
subprocess.check_call(cmake_args)
File "C:\Users\YI\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\Program Files\CMake\bin\cmake.exe', '-DPYTHON_INCLUDE_DIR=C:\Users\YI\AppData\Local\Programs\Python\Python310\include', '-DPYTHON_EXECUTABLE=C:\Users\YI\AppData\Local\Programs\Python\Python310\python.exe', '-DBUILD_ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cp310-win_amd64.pyd', '-DCMAKE_BUILD_TYPE=Release', '-DPY_VERSION=3.10', '-DONNX_USE_MSVC_STATIC_RUNTIME=ON', '-A', 'x64', '-T', 'host=x64', '-DONNX_ML=1', 'C:\Users\YI\AppData\Local\Temp\pip-install-7jfedea1\onnx_9f6dd7ae807b48cdb3af1e3d5618d72e']' 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
Failed to build onnx
ERROR: Could not build wheels for onnx, which is required to install pyproject.toml-based projects
Python 3.10 wheel 尚不支持 onnx.I 由于这个原因,请在 otherwebsite.maybe 中找到它。 19/5/2022
我的电脑系统是Windows10, python版本为3.10.2, pip 版本是 22.1.
我在 cmd.exe 中尝试“pip install paddlehub”,但在最后提示时失败了:
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for onnx
Failed to build onnx
ERROR: Could not build wheels for onnx, which is required to install pyproject.toml-based projects
onnx 的堆栈? 我能有什么建议吗? 试了google一些关键字2天了,'cmake','GCC'等,还是没法解决。 谢谢你的时间。
这是 cmd 中的全部失败日志。
Building wheels for collected packages: onnx
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: not a git repository (or any of the parent directories): .git
C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\dist.py:772: UserWarning: Usage of dash-separated 'license-file' will not be supported in future versions. Please use the underscore name 'license_file' instead
warnings.warn(
C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\config\setupcfg.py:459: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
warnings.warn(msg, warning_class)
running bdist_wheel
running build
running build_py
running create_version
running cmake_build
Using cmake args: ['C:\Program Files\CMake\bin\cmake.exe', '-DPYTHON_INCLUDE_DIR=C:\Users\YI\AppData\Local\Programs\Python\Python310\include', '-DPYTHON_EXECUTABLE=C:\Users\YI\AppData\Local\Programs\Python\Python310\python.exe', '-DBUILD_ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cp310-win_amd64.pyd', '-DCMAKE_BUILD_TYPE=Release', '-DPY_VERSION=3.10', '-DONNX_USE_MSVC_STATIC_RUNTIME=ON', '-A', 'x64', '-T', 'host=x64', '-DONNX_ML=1', 'C:\Users\YI\AppData\Local\Temp\pip-install-7jfedea1\onnx_9f6dd7ae807b48cdb3af1e3d5618d72e']
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19044.
-- The C compiler identification is MSVC 19.23.28106.4
-- The CXX compiler identification is MSVC 19.23.28106.4
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: D:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe - 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: D:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: C:/Users/YI/AppData/Local/Programs/Python/Python310/python.exe (found suitable version "3.10.2", minimum required is "3.10")
-- Found PythonLibs: C:/Users/YI/AppData/Local/Programs/Python/Python310/libs/python310.lib (found suitable version "3.10.2", minimum required is "3.10")
Generated: C:/Users/YI/AppData/Local/Temp/pip-install-7jfedea1/onnx_9f6dd7ae807b48cdb3af1e3d5618d72e/.setuptools-cmake-build/onnx/onnx-ml.proto
CMake Error at CMakeLists.txt:292 (message):
Protobuf compiler not found
Call Stack (most recent call first):
CMakeLists.txt:323 (relative_protobuf_generate_cpp)
-- Configuring incomplete, errors occurred!
See also "C:/Users/YI/AppData/Local/Temp/pip-install-7jfedea1/onnx_9f6dd7ae807b48cdb3af1e3d5618d72e/.setuptools-cmake-build/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "C:\Users\YI\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module>
main()
File "C:\Users\YI\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\YI\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 261, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\build_meta.py", line 244, in build_wheel
return self._build_with_temp_dir(['bdist_wheel'], '.whl',
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\build_meta.py", line 229, in _build_with_temp_dir
self.run_setup()
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\build_meta.py", line 281, in run_setup
super(_BuildMetaLegacyBackend,
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\build_meta.py", line 174, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 337, in <module>
setuptools.setup(
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 148, in setup
return run_commands(dist)
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 163, in run_commands
dist.run_commands()
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 967, in run_commands
self.run_command(cmd)
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\dist.py", line 1229, in run_command
super().run_command(command)
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 986, in run_command
cmd_obj.run()
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\wheel\bdist_wheel.py", line 299, in run
self.run_command('build')
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\dist.py", line 1229, in run_command
super().run_command(command)
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 986, in run_command
cmd_obj.run()
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\_distutils\command\build.py", line 136, in run
self.run_command(cmd_name)
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\dist.py", line 1229, in run_command
super().run_command(command)
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 986, in run_command
cmd_obj.run()
File "setup.py", line 233, in run
self.run_command('cmake_build')
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\dist.py", line 1229, in run_command
super().run_command(command)
File "C:\Users\YI\AppData\Local\Temp\pip-build-env-qi95bprp\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 986, in run_command
cmd_obj.run()
File "setup.py", line 219, in run
subprocess.check_call(cmake_args)
File "C:\Users\YI\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\Program Files\CMake\bin\cmake.exe', '-DPYTHON_INCLUDE_DIR=C:\Users\YI\AppData\Local\Programs\Python\Python310\include', '-DPYTHON_EXECUTABLE=C:\Users\YI\AppData\Local\Programs\Python\Python310\python.exe', '-DBUILD_ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cp310-win_amd64.pyd', '-DCMAKE_BUILD_TYPE=Release', '-DPY_VERSION=3.10', '-DONNX_USE_MSVC_STATIC_RUNTIME=ON', '-A', 'x64', '-T', 'host=x64', '-DONNX_ML=1', 'C:\Users\YI\AppData\Local\Temp\pip-install-7jfedea1\onnx_9f6dd7ae807b48cdb3af1e3d5618d72e']' 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
Failed to build onnx
ERROR: Could not build wheels for onnx, which is required to install pyproject.toml-based projects
Python 3.10 wheel 尚不支持 onnx.I 由于这个原因,请在 otherwebsite.maybe 中找到它。 19/5/2022