Open KevinXuxuxu opened 3 months ago
另一个关于onnxoptimizer的问题,跟tensorflow的版本应该是无关的
Building wheels for collected packages: onnxoptimizer, h5py
Building wheel for onnxoptimizer (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [95 lines of output]
fatal: not a git repository (or any of the parent directories): .git
/mnt/m2/fzxu/projects/rknn/lib/python3.10/site-packages/setuptools/dist.py:478: SetuptoolsDeprecationWarning: Invalid dash-separated options
!!
********************************************************************************
Usage of dash-separated 'license-file' will not be supported in future
versions. Please use the underscore name 'license_file' instead.
By 2024-Sep-26, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
********************************************************************************
!!
opt = self.warn_dash_deprecation(opt, section)
/mnt/m2/fzxu/projects/rknn/lib/python3.10/site-packages/setuptools/__init__.py:80: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!
********************************************************************************
Requirements should be satisfied by a PEP 517 installer.
If you are using pip, you can try `pip install --use-pep517`.
********************************************************************************
!!
dist.fetch_build_eggs(dist.setup_requires)
running bdist_wheel
running build
running build_py
running create_version
running cmake_build
-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is unknown
-- 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
CMake Error at CMakeLists.txt:9 (project):
No CMAKE_CXX_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "/tmp/pip-install-6tc7x7pz/onnxoptimizer_ac8e02dab38746c684f08174058999e4/.setuptools-cmake-build/CMakeFiles/CMakeOutput.log".
See also "/tmp/pip-install-6tc7x7pz/onnxoptimizer_ac8e02dab38746c684f08174058999e4/.setuptools-cmake-build/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-6tc7x7pz/onnxoptimizer_ac8e02dab38746c684f08174058999e4/setup.py", line 320, in <module>
setuptools.setup(
File "/mnt/m2/fzxu/projects/rknn/lib/python3.10/site-packages/setuptools/__init__.py", line 103, in setup
return distutils.core.setup(**attrs)
File "/mnt/m2/fzxu/projects/rknn/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 184, in setup
return run_commands(dist)
File "/mnt/m2/fzxu/projects/rknn/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
dist.run_commands()
File "/mnt/m2/fzxu/projects/rknn/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/mnt/m2/fzxu/projects/rknn/lib/python3.10/site-packages/setuptools/dist.py", line 976, in run_command
super().run_command(command)
File "/mnt/m2/fzxu/projects/rknn/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/mnt/m2/fzxu/projects/rknn/lib/python3.10/site-packages/setuptools/command/bdist_wheel.py", line 373, in run
self.run_command("build")
File "/mnt/m2/fzxu/projects/rknn/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "/mnt/m2/fzxu/projects/rknn/lib/python3.10/site-packages/setuptools/dist.py", line 976, in run_command
super().run_command(command)
File "/mnt/m2/fzxu/projects/rknn/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/mnt/m2/fzxu/projects/rknn/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 132, in run
self.run_command(cmd_name)
File "/mnt/m2/fzxu/projects/rknn/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "/mnt/m2/fzxu/projects/rknn/lib/python3.10/site-packages/setuptools/dist.py", line 976, in run_command
super().run_command(command)
File "/mnt/m2/fzxu/projects/rknn/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/tmp/pip-install-6tc7x7pz/onnxoptimizer_ac8e02dab38746c684f08174058999e4/setup.py", line 216, in run
self.run_command('cmake_build')
File "/mnt/m2/fzxu/projects/rknn/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "/mnt/m2/fzxu/projects/rknn/lib/python3.10/site-packages/setuptools/dist.py", line 976, in run_command
super().run_command(command)
File "/mnt/m2/fzxu/projects/rknn/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/tmp/pip-install-6tc7x7pz/onnxoptimizer_ac8e02dab38746c684f08174058999e4/setup.py", line 202, in run
subprocess.check_call(cmake_args)
File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/cmake', '-DPython_INCLUDE_DIR=/usr/include/python3.10', '-DPython_EXECUTABLE=/mnt/m2/fzxu/projects/rknn/bin/python', '-DBUILD_ONNX_PYTHON=ON', '-DONNX_USE_LITE_PROTO=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cpython-310-aarch64-linux-gnu.so', '-DONNX_OPT_USE_SYSTEM_PROTOBUF=OFF', '-DCMAKE_BUILD_TYPE=Release', '-DONNX_ML=1', '/tmp/pip-install-6tc7x7pz/onnxoptimizer_ac8e02dab38746c684f08174058999e4']' 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 onnxoptimizer
Running setup.py clean for onnxoptimizer
Building wheel for h5py (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for h5py (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [73 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-aarch64-cpython-310
creating build/lib.linux-aarch64-cpython-310/h5py
copying h5py/ipy_completer.py -> build/lib.linux-aarch64-cpython-310/h5py
copying h5py/version.py -> build/lib.linux-aarch64-cpython-310/h5py
copying h5py/__init__.py -> build/lib.linux-aarch64-cpython-310/h5py
copying h5py/h5py_warnings.py -> build/lib.linux-aarch64-cpython-310/h5py
creating build/lib.linux-aarch64-cpython-310/h5py/_hl
copying h5py/_hl/selections.py -> build/lib.linux-aarch64-cpython-310/h5py/_hl
copying h5py/_hl/compat.py -> build/lib.linux-aarch64-cpython-310/h5py/_hl
copying h5py/_hl/dims.py -> build/lib.linux-aarch64-cpython-310/h5py/_hl
copying h5py/_hl/group.py -> build/lib.linux-aarch64-cpython-310/h5py/_hl
copying h5py/_hl/datatype.py -> build/lib.linux-aarch64-cpython-310/h5py/_hl
copying h5py/_hl/vds.py -> build/lib.linux-aarch64-cpython-310/h5py/_hl
copying h5py/_hl/__init__.py -> build/lib.linux-aarch64-cpython-310/h5py/_hl
copying h5py/_hl/filters.py -> build/lib.linux-aarch64-cpython-310/h5py/_hl
copying h5py/_hl/attrs.py -> build/lib.linux-aarch64-cpython-310/h5py/_hl
copying h5py/_hl/files.py -> build/lib.linux-aarch64-cpython-310/h5py/_hl
copying h5py/_hl/base.py -> build/lib.linux-aarch64-cpython-310/h5py/_hl
copying h5py/_hl/dataset.py -> build/lib.linux-aarch64-cpython-310/h5py/_hl
copying h5py/_hl/selections2.py -> build/lib.linux-aarch64-cpython-310/h5py/_hl
creating build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/test_file.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/test_file_alignment.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/test_datatype.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/test_file_image.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/conftest.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/test_h5.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/test_group.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/test_slicing.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/test_completions.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/test_attrs.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/test_file2.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/test_dtype.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/test_dataset_getitem.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/test_dataset.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/test_h5z.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/test_h5f.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/test_filters.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/__init__.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/test_big_endian_file.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/test_attrs_data.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/test_dimension_scales.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/test_dataset_swmr.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/test_h5p.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/test_errors.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/test_h5d_direct_chunk.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/test_dims_dimensionproxy.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/common.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/test_h5pl.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/test_selections.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/test_attribute_create.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/test_base.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/test_objects.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/test_h5o.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/test_ros3.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
copying h5py/tests/test_h5t.py -> build/lib.linux-aarch64-cpython-310/h5py/tests
creating build/lib.linux-aarch64-cpython-310/h5py/tests/data_files
copying h5py/tests/data_files/__init__.py -> build/lib.linux-aarch64-cpython-310/h5py/tests/data_files
creating build/lib.linux-aarch64-cpython-310/h5py/tests/test_vds
copying h5py/tests/test_vds/test_lowlevel_vds.py -> build/lib.linux-aarch64-cpython-310/h5py/tests/test_vds
copying h5py/tests/test_vds/__init__.py -> build/lib.linux-aarch64-cpython-310/h5py/tests/test_vds
copying h5py/tests/test_vds/test_highlevel_vds.py -> build/lib.linux-aarch64-cpython-310/h5py/tests/test_vds
copying h5py/tests/test_vds/test_virtual_source.py -> build/lib.linux-aarch64-cpython-310/h5py/tests/test_vds
copying h5py/tests/data_files/vlen_string_dset_utc.h5 -> build/lib.linux-aarch64-cpython-310/h5py/tests/data_files
copying h5py/tests/data_files/vlen_string_s390x.h5 -> build/lib.linux-aarch64-cpython-310/h5py/tests/data_files
copying h5py/tests/data_files/vlen_string_dset.h5 -> build/lib.linux-aarch64-cpython-310/h5py/tests/data_files
running build_ext
Building h5py requires pkg-config unless the HDF5 path is explicitly specified using the environment variable HDF5_DIR. For more information and details, see https://docs.h5py.org/en/stable/build.html#custom-installation
error: pkg-config probably not installed: FileNotFoundError(2, 'No such file or directory')
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for h5py
Failed to build onnxoptimizer h5py
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (onnxoptimizer, h5py)
换成推荐的Python 3.8也没用,都是一样的错误
问题解决了吗?
对我也遇到了这个onnxoptimizer版本问题,我都已经安装了rknn-toolkit2==2.3.0 还在提示下载安装
#9 333.7 Collecting onnxoptimizer==0.2.7
#9 333.9 Downloading onnxoptimizer-0.2.7.tar.gz (16.8 MB)
#9 362.0 ERROR: Command errored out with exit status 1:
#9 362.0 command: /usr/local/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2xj4qxe8/onnxoptimizer_51d59eadc6c04f65affd86accf69080f/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2xj4qxe8/onnxoptimizer_51d59eadc6c04f65affd86accf69080f/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'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-dvb9c_7p
#9 362.0 cwd: /tmp/pip-install-2xj4qxe8/onnxoptimizer_51d59eadc6c04f65affd86accf69080f/
#9 362.0 Complete output (5 lines):
#9 362.0 Traceback (most recent call last):
#9 362.0 File "<string>", line 1, in <module>
#9 362.0 File "/tmp/pip-install-2xj4qxe8/onnxoptimizer_51d59eadc6c04f65affd86accf69080f/setup.py", line 75, in <module>
#9 362.0 assert CMAKE, 'Could not find "cmake" executable!'
#9 362.0 AssertionError: Could not find "cmake" executable!
#9 362.0 ----------------------------------------
#9 362.0 WARNING: Discarding https://files.pythonhosted.org/packages/a3/56/b7c3af61c87d565c4721c6d33b50fcc007c3545b1c5ffd118023ed342197/onnxoptimizer-0.2.7.tar.gz#sha256=a9f972b2b68ceb82b1f268042879f807fceb9ad76e38def2a39f102e62216d21 (from https://pypi.org/simple/onnxoptimizer/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
#9 362.0 INFO: pip is looking at multiple versions of onnx to determine which version is compatible with other requirements. This could take a while.
#9 362.0 INFO: pip is looking at multiple versions of ultralytics to determine which version is compatible with other requirements. This could take a while.
#9 362.0 INFO: pip is looking at multiple versions of paddlepaddle to determine which version is compatible with other requirements. This could take a while.
#9 362.0 INFO: pip is looking at multiple versions of paddleocr to determine which version is compatible with other requirements. This could take a while.
#9 362.0 INFO: pip is looking at multiple versions of opencv-python-headless to determine which version is compatible with other requirements. This could take a while.
#9 362.0 INFO: pip is looking at multiple versions of <Python from Requires-Python> to determine which version is compatible with other requirements. This could take a while.
#9 362.0 INFO: pip is looking at multiple versions of torch to determine which version is compatible with other requirements. This could take a while.
#9 362.0 ERROR: Could not find a version that satisfies the requirement onnxoptimizer==0.2.7 (from rknn-toolkit2) (from versions: 0.2.7, 0.3.0, 0.3.1, 0.3.2, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9, 0.3.10, 0.3.11, 0.3.12, 0.3.13)
#9 362.0 ERROR: No matching distribution found for onnxoptimizer==0.2.7
#9 364.4 WARNING: You are using pip version 21.1.3; however, version 24.3.1 is available.
#9 364.4 You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
#9 ERROR: process "/dev/.buildkit_qemu_emulator /bin/sh -c pip install -r requirements.txt" did not complete successfully: exit code: 1
tensorflow==2.8.1
现在哪个源应该都不支持了吧,至少都到2.10.1
了