tensorflow / kfac

An implementation of KFAC for TensorFlow
Apache License 2.0
197 stars 41 forks source link

Installation Error during building wheel for h5py #47

Open UnbearableFate opened 11 months ago

UnbearableFate commented 11 months ago

Env:

Python 3.10.13 tensorboard 2.15.1 tensorboard-data-server 0.7.2 tensorflow 2.15.0.post1 tensorflow-estimator 2.15.0 tensorflow-io-gcs-filesystem 0.34.0

Requirement already satisfied: h5py in /home//venv/lib/python3.10/site-packages (3.10.0) Requirement already satisfied: numpy>=1.17.3 in /home//venv/lib/python3.10/site-packages (from h5py) (1.26.2) Requirement already satisfied: cython in /home/**/venv/lib/python3.10/site-packages (3.0.6)

full error log like below:

Building wheels for collected packages: h5py Building wheel for h5py (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [499 lines of output] /usr/lib/python3/dist-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer. warnings.warn( running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.10 creating build/lib.linux-x86_64-3.10/h5py copying h5py/init.py -> build/lib.linux-x86_64-3.10/h5py copying h5py/h5py_warnings.py -> build/lib.linux-x86_64-3.10/h5py copying h5py/highlevel.py -> build/lib.linux-x86_64-3.10/h5py copying h5py/ipy_completer.py -> build/lib.linux-x86_64-3.10/h5py copying h5py/version.py -> build/lib.linux-x86_64-3.10/h5py creating build/lib.linux-x86_64-3.10/h5py/_hl copying h5py/_hl/init.py -> build/lib.linux-x86_64-3.10/h5py/_hl copying h5py/_hl/attrs.py -> build/lib.linux-x86_64-3.10/h5py/_hl copying h5py/_hl/base.py -> build/lib.linux-x86_64-3.10/h5py/_hl copying h5py/_hl/compat.py -> build/lib.linux-x86_64-3.10/h5py/_hl copying h5py/_hl/dataset.py -> build/lib.linux-x86_64-3.10/h5py/_hl copying h5py/_hl/datatype.py -> build/lib.linux-x86_64-3.10/h5py/_hl copying h5py/_hl/dims.py -> build/lib.linux-x86_64-3.10/h5py/_hl copying h5py/_hl/files.py -> build/lib.linux-x86_64-3.10/h5py/_hl copying h5py/_hl/filters.py -> build/lib.linux-x86_64-3.10/h5py/_hl copying h5py/_hl/group.py -> build/lib.linux-x86_64-3.10/h5py/_hl copying h5py/_hl/selections.py -> build/lib.linux-x86_64-3.10/h5py/_hl copying h5py/_hl/selections2.py -> build/lib.linux-x86_64-3.10/h5py/_hl copying h5py/_hl/vds.py -> build/lib.linux-x86_64-3.10/h5py/_hl creating build/lib.linux-x86_64-3.10/h5py/tests copying h5py/tests/init.py -> build/lib.linux-x86_64-3.10/h5py/tests copying h5py/tests/common.py -> build/lib.linux-x86_64-3.10/h5py/tests copying h5py/tests/test_attribute_create.py -> build/lib.linux-x86_64-3.10/h5py/tests copying h5py/tests/test_attrs.py -> build/lib.linux-x86_64-3.10/h5py/tests copying h5py/tests/test_attrs_data.py -> build/lib.linux-x86_64-3.10/h5py/tests copying h5py/tests/test_base.py -> build/lib.linux-x86_64-3.10/h5py/tests copying h5py/tests/test_completions.py -> build/lib.linux-x86_64-3.10/h5py/tests copying h5py/tests/test_dataset.py -> build/lib.linux-x86_64-3.10/h5py/tests copying h5py/tests/test_dataset_getitem.py -> build/lib.linux-x86_64-3.10/h5py/tests copying h5py/tests/test_dataset_swmr.py -> build/lib.linux-x86_64-3.10/h5py/tests copying h5py/tests/test_datatype.py -> build/lib.linux-x86_64-3.10/h5py/tests copying h5py/tests/test_deprecation.py -> build/lib.linux-x86_64-3.10/h5py/tests copying h5py/tests/test_dimension_scales.py -> build/lib.linux-x86_64-3.10/h5py/tests copying h5py/tests/test_dims_dimensionproxy.py -> build/lib.linux-x86_64-3.10/h5py/tests copying h5py/tests/test_dtype.py -> build/lib.linux-x86_64-3.10/h5py/tests copying h5py/tests/test_file.py -> build/lib.linux-x86_64-3.10/h5py/tests copying h5py/tests/test_file2.py -> build/lib.linux-x86_64-3.10/h5py/tests copying h5py/tests/test_file_image.py -> build/lib.linux-x86_64-3.10/h5py/tests copying h5py/tests/test_filters.py -> build/lib.linux-x86_64-3.10/h5py/tests copying h5py/tests/test_group.py -> build/lib.linux-x86_64-3.10/h5py/tests copying h5py/tests/test_h5.py -> build/lib.linux-x86_64-3.10/h5py/tests copying h5py/tests/test_h5d_direct_chunk.py -> build/lib.linux-x86_64-3.10/h5py/tests copying h5py/tests/test_h5f.py -> build/lib.linux-x86_64-3.10/h5py/tests copying h5py/tests/test_h5p.py -> build/lib.linux-x86_64-3.10/h5py/tests copying h5py/tests/test_h5pl.py -> build/lib.linux-x86_64-3.10/h5py/tests copying h5py/tests/test_h5t.py -> build/lib.linux-x86_64-3.10/h5py/tests copying h5py/tests/test_objects.py -> build/lib.linux-x86_64-3.10/h5py/tests copying h5py/tests/test_selections.py -> build/lib.linux-x86_64-3.10/h5py/tests copying h5py/tests/test_slicing.py -> build/lib.linux-x86_64-3.10/h5py/tests copying h5py/tests/test_threads.py -> build/lib.linux-x86_64-3.10/h5py/tests creating build/lib.linux-x86_64-3.10/h5py/tests/test_vds copying h5py/tests/test_vds/init.py -> build/lib.linux-x86_64-3.10/h5py/tests/test_vds copying h5py/tests/test_vds/test_highlevel_vds.py -> build/lib.linux-x86_64-3.10/h5py/tests/test_vds copying h5py/tests/test_vds/test_lowlevel_vds.py -> build/lib.linux-x86_64-3.10/h5py/tests/test_vds copying h5py/tests/test_vds/test_virtual_source.py -> build/lib.linux-x86_64-3.10/h5py/tests/test_vds running build_ext Loading library to get version: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so Autodetected HDF5 1.10.7


                         Summary of the h5py configuration

      Path to HDF5: None
      HDF5 Version: '1.10.7'
       MPI Enabled: False
  Rebuild Required: True

  ********************************************************************************
  Executing api_gen rebuild of defs
  Executing cythonize()
  [ 1/23] Cythonizing /tmp/pip-install-qpnjl6me/h5py_53690c65174c42f1bd5fe2bc944dc6b0/h5py/_conv.pyx
  warning: h5py/defs.pxd:57:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:59:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:61:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:63:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:65:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:67:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:92:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:94:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:96:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:97:4: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:99:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:100:4: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:102:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:168:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:204:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:232:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:234:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:236:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:238:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:240:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:242:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:248:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:250:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:252:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:254:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:256:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:258:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:290:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:292:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:294:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:296:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:298:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:300:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:302:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:304:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:306:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:340:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/defs.pxd:342:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/api_types_hdf5.pxd:55:2: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/api_types_hdf5.pxd:128:2: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/api_types_hdf5.pxd:197:2: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/api_types_hdf5.pxd:418:2: 'H5D_layout_t' redeclared
  warning: h5py/api_types_hdf5.pxd:425:2: 'H5D_alloc_time_t' redeclared
  warning: h5py/api_types_hdf5.pxd:432:2: 'H5D_space_status_t' redeclared
  warning: h5py/api_types_hdf5.pxd:438:2: 'H5D_fill_time_t' redeclared
  warning: h5py/api_types_hdf5.pxd:444:2: 'H5D_fill_value_t' redeclared
  warning: h5py/api_types_hdf5.pxd:456:7: 'H5F_close_degree_t' redeclared
  warning: h5py/api_types_hdf5.pxd:462:2: 'H5FD_mem_t' redeclared
  warning: h5py/api_types_hdf5.pxd:560:2: 'H5T_cset_t' redeclared
  warning: h5py/api_types_hdf5.pxd:739:7: 'H5Z_EDC_t' redeclared
  warning: h5py/api_types_ext.pxd:14:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/api_types_ext.pxd:35:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/api_types_ext.pxd:71:2: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
  warning: h5py/api_types_hdf5.pxd:419:4: 'H5D_LAYOUT_ERROR' redeclared
  warning: h5py/api_types_hdf5.pxd:420:4: 'H5D_COMPACT' redeclared
  warning: h5py/api_types_hdf5.pxd:421:4: 'H5D_CONTIGUOUS' redeclared
  warning: h5py/api_types_hdf5.pxd:422:4: 'H5D_CHUNKED' redeclared
  warning: h5py/api_types_hdf5.pxd:423:4: 'H5D_NLAYOUTS' redeclared
  warning: h5py/api_types_hdf5.pxd:426:4: 'H5D_ALLOC_TIME_ERROR' redeclared
  warning: h5py/api_types_hdf5.pxd:427:4: 'H5D_ALLOC_TIME_DEFAULT' redeclared
  warning: h5py/api_types_hdf5.pxd:428:4: 'H5D_ALLOC_TIME_EARLY' redeclared
  warning: h5py/api_types_hdf5.pxd:429:4: 'H5D_ALLOC_TIME_LATE' redeclared
  warning: h5py/api_types_hdf5.pxd:430:4: 'H5D_ALLOC_TIME_INCR' redeclared
  warning: h5py/api_types_hdf5.pxd:433:4: 'H5D_SPACE_STATUS_ERROR' redeclared
  warning: h5py/api_types_hdf5.pxd:434:4: 'H5D_SPACE_STATUS_NOT_ALLOCATED' redeclared
  warning: h5py/api_types_hdf5.pxd:435:4: 'H5D_SPACE_STATUS_PART_ALLOCATED' redeclared
  warning: h5py/api_types_hdf5.pxd:436:4: 'H5D_SPACE_STATUS_ALLOCATED' redeclared
  warning: h5py/api_types_hdf5.pxd:439:4: 'H5D_FILL_TIME_ERROR' redeclared
  warning: h5py/api_types_hdf5.pxd:440:4: 'H5D_FILL_TIME_ALLOC' redeclared
  warning: h5py/api_types_hdf5.pxd:441:4: 'H5D_FILL_TIME_NEVER' redeclared
  warning: h5py/api_types_hdf5.pxd:442:4: 'H5D_FILL_TIME_IFSET' redeclared
  warning: h5py/api_types_hdf5.pxd:445:4: 'H5D_FILL_VALUE_ERROR' redeclared
  warning: h5py/api_types_hdf5.pxd:446:4: 'H5D_FILL_VALUE_UNDEFINED' redeclared
  warning: h5py/api_types_hdf5.pxd:447:4: 'H5D_FILL_VALUE_DEFAULT' redeclared
  warning: h5py/api_types_hdf5.pxd:448:4: 'H5D_FILL_VALUE_USER_DEFINED' redeclared
  warning: h5py/api_types_hdf5.pxd:457:4: 'H5F_CLOSE_WEAK' redeclared
  warning: h5py/api_types_hdf5.pxd:458:4: 'H5F_CLOSE_SEMI' redeclared
  warning: h5py/api_types_hdf5.pxd:459:4: 'H5F_CLOSE_STRONG' redeclared
  warning: h5py/api_types_hdf5.pxd:460:4: 'H5F_CLOSE_DEFAULT' redeclared
  warning: h5py/api_types_hdf5.pxd:463:4: 'H5FD_MEM_NOLIST' redeclared
  warning: h5py/api_types_hdf5.pxd:464:4: 'H5FD_MEM_DEFAULT' redeclared
  warning: h5py/api_types_hdf5.pxd:465:4: 'H5FD_MEM_SUPER' redeclared
  warning: h5py/api_types_hdf5.pxd:466:4: 'H5FD_MEM_BTREE' redeclared
  warning: h5py/api_types_hdf5.pxd:467:4: 'H5FD_MEM_DRAW' redeclared
  warning: h5py/api_types_hdf5.pxd:468:4: 'H5FD_MEM_GHEAP' redeclared
  warning: h5py/api_types_hdf5.pxd:469:4: 'H5FD_MEM_LHEAP' redeclared
  warning: h5py/api_types_hdf5.pxd:470:4: 'H5FD_MEM_OHDR' redeclared
  warning: h5py/api_types_hdf5.pxd:471:4: 'H5FD_MEM_NTYPES' redeclared
  warning: h5py/api_types_hdf5.pxd:561:4: 'H5T_CSET_ERROR' redeclared
  warning: h5py/api_types_hdf5.pxd:562:4: 'H5T_CSET_ASCII' redeclared
  warning: h5py/api_types_hdf5.pxd:705:2: 'H5Z_filter_t' redeclared
  warning: h5py/api_types_hdf5.pxd:740:6: 'H5Z_ERROR_EDC' redeclared
  warning: h5py/api_types_hdf5.pxd:741:6: 'H5Z_DISABLE_EDC' redeclared
  warning: h5py/api_types_hdf5.pxd:742:6: 'H5Z_ENABLE_EDC' redeclared
  warning: h5py/api_types_hdf5.pxd:743:6: 'H5Z_NO_EDC' redeclared

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
  # License:  Standard 3-clause BSD; see "license.txt" for full license terms
  #           and contributor agreement.

  from defs cimport *

  from _objects cimport class ObjectID
                        ^
  ------------------------------------------------------------

  h5py/h5t.pxd:12:22: Expected an identifier

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
      Low-level type-conversion routines.
  """

  from h5 import get_config
  from h5r cimport Reference, RegionReference, hobj_ref_t, hdset_reg_ref_t
  from h5t cimport H5PY_OBJ, typewrap, py_create, TypeID
  ^
  ------------------------------------------------------------

  h5py/_conv.pyx:18:0: 'h5py/h5t/H5PY_OBJ.pxd' not found

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
      Low-level type-conversion routines.
  """

  from h5 import get_config
  from h5r cimport Reference, RegionReference, hobj_ref_t, hdset_reg_ref_t
  from h5t cimport H5PY_OBJ, typewrap, py_create, TypeID
  ^
  ------------------------------------------------------------

  h5py/_conv.pyx:18:0: 'h5py/h5t/typewrap.pxd' not found

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
      Low-level type-conversion routines.
  """

  from h5 import get_config
  from h5r cimport Reference, RegionReference, hobj_ref_t, hdset_reg_ref_t
  from h5t cimport H5PY_OBJ, typewrap, py_create, TypeID
  ^
  ------------------------------------------------------------

  h5py/_conv.pyx:18:0: 'h5py/h5t/py_create.pxd' not found

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
      Low-level type-conversion routines.
  """

  from h5 import get_config
  from h5r cimport Reference, RegionReference, hobj_ref_t, hdset_reg_ref_t
  from h5t cimport H5PY_OBJ, typewrap, py_create, TypeID
  ^
  ------------------------------------------------------------

  h5py/_conv.pyx:18:0: 'h5py/h5t/TypeID.pxd' not found

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
  cdef struct vlen_t:
      size_t len
      void* ptr

  cdef int conv_vlen2ndarray(void* ipt, void* opt, np.dtype elem_dtype,
          TypeID intype, TypeID outtype) except -1:
          ^
  ------------------------------------------------------------

  h5py/_conv.pyx:680:8: 'TypeID' is not a type identifier

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
  cdef struct vlen_t:
      size_t len
      void* ptr

  cdef int conv_vlen2ndarray(void* ipt, void* opt, np.dtype elem_dtype,
          TypeID intype, TypeID outtype) except -1:
                         ^
  ------------------------------------------------------------

  h5py/_conv.pyx:680:23: 'TypeID' is not a type identifier

  Error compiling Cython file:
  ------------------------------------------------------------
  ...

      return 0

  cdef int conv_ndarray2vlen(void* ipt, void* opt,
          TypeID intype, TypeID outtype) except -1:
          ^
  ------------------------------------------------------------

  h5py/_conv.pyx:788:8: 'TypeID' is not a type identifier

  Error compiling Cython file:
  ------------------------------------------------------------
  ...

      return 0

  cdef int conv_ndarray2vlen(void* ipt, void* opt,
          TypeID intype, TypeID outtype) except -1:
                         ^
  ------------------------------------------------------------

  h5py/_conv.pyx:788:23: 'TypeID' is not a type identifier

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
                      size_t nl, size_t buf_stride, size_t bkg_stride, void *buf_i,
                      void *bkg_i, hid_t dxpl) except -1:

      cdef int command = cdata[0].command
      cdef size_t src_size, dst_size
      cdef TypeID supertype
           ^
  ------------------------------------------------------------

  h5py/_conv.pyx:620:9: 'TypeID' is not a type identifier

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
                      void *bkg_i, hid_t dxpl) except -1:

      cdef int command = cdata[0].command
      cdef size_t src_size, dst_size
      cdef TypeID supertype
      cdef TypeID outtype
           ^
  ------------------------------------------------------------

  h5py/_conv.pyx:621:9: 'TypeID' is not a type identifier

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
                      size_t nl, size_t buf_stride, size_t bkg_stride, void *buf_i,
                      void *bkg_i, hid_t dxpl) except -1:

      cdef int command = cdata[0].command
      cdef size_t src_size, dst_size
      cdef TypeID supertype
           ^
  ------------------------------------------------------------

  h5py/_conv.pyx:718:9: 'TypeID' is not a type identifier

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
                      void *bkg_i, hid_t dxpl) except -1:

      cdef int command = cdata[0].command
      cdef size_t src_size, dst_size
      cdef TypeID supertype
      cdef TypeID outtype
           ^
  ------------------------------------------------------------

  h5py/_conv.pyx:719:9: 'TypeID' is not a type identifier

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
          pass

      elif command == H5T_CONV_CONV:

          # need to pass element dtype to converter
          supertype = typewrap(H5Tget_super(src_id))
                      ^
  ------------------------------------------------------------

  h5py/_conv.pyx:640:20: 'typewrap' is not a constant, variable or function identifier

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
      elif command == H5T_CONV_CONV:

          # need to pass element dtype to converter
          supertype = typewrap(H5Tget_super(src_id))
          dt = supertype.dtype
          outtype = py_create(dt)
                    ^
  ------------------------------------------------------------

  h5py/_conv.pyx:642:18: 'py_create' is not a constant, variable or function identifier

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
      cdef char* buf = <char*>buf_i

      if command == H5T_CONV_INIT:

          cdata[0].need_bkg = H5T_BKG_NO
          if not H5Tequal(src_id, H5PY_OBJ) or H5Tget_class(dst_id) != H5T_VLEN:
                                  ^
  ------------------------------------------------------------

  h5py/_conv.pyx:730:32: 'H5PY_OBJ' is not a constant, variable or function identifier

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
      if command == H5T_CONV_INIT:

          cdata[0].need_bkg = H5T_BKG_NO
          if not H5Tequal(src_id, H5PY_OBJ) or H5Tget_class(dst_id) != H5T_VLEN:
              return -2
          supertype = typewrap(H5Tget_super(dst_id))
                      ^
  ------------------------------------------------------------

  h5py/_conv.pyx:732:20: 'typewrap' is not a constant, variable or function identifier

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
          if not H5Tequal(src_id, H5PY_OBJ) or H5Tget_class(dst_id) != H5T_VLEN:
              return -2
          supertype = typewrap(H5Tget_super(dst_id))
          for i from 0 <= i < nl:
              memcpy(&pdata_elem, pdata+i, sizeof(pdata_elem))
              if supertype != py_create((<np.ndarray> pdata_elem).dtype, 1):
                              ^
  ------------------------------------------------------------

  h5py/_conv.pyx:735:28: 'py_create' is not a constant, variable or function identifier

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
          if nl == 0:
              return 0

          # need to pass element dtype to converter
          memcpy(&pdata_elem, pdata, sizeof(pdata_elem))
          supertype = py_create((<np.ndarray> pdata_elem).dtype)
                      ^
  ------------------------------------------------------------

  h5py/_conv.pyx:753:20: 'py_create' is not a constant, variable or function identifier

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
              return 0

          # need to pass element dtype to converter
          memcpy(&pdata_elem, pdata, sizeof(pdata_elem))
          supertype = py_create((<np.ndarray> pdata_elem).dtype)
          outtype = typewrap(H5Tget_super(dst_id))
                    ^
  ------------------------------------------------------------

  h5py/_conv.pyx:754:18: 'typewrap' is not a constant, variable or function identifier

  Error compiling Cython file:
  ------------------------------------------------------------
  ...

      enum = H5Tenum_create(H5T_STD_I32LE)

      vlentype = H5Tvlen_create(H5T_STD_I32LE)

      pyobj = H5PY_OBJ
              ^
  ------------------------------------------------------------

  h5py/_conv.pyx:860:12: 'H5PY_OBJ' is not a constant, variable or function identifier
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/tmp/pip-install-qpnjl6me/h5py_53690c65174c42f1bd5fe2bc944dc6b0/setup.py", line 140, in <module>
      setup(
    File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
    File "/usr/lib/python3.10/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/lib/python3.10/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/usr/lib/python3.10/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 299, in run
      self.run_command('build')
    File "/usr/lib/python3.10/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.10/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/lib/python3.10/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/usr/lib/python3.10/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.10/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/tmp/pip-install-qpnjl6me/h5py_53690c65174c42f1bd5fe2bc944dc6b0/setup_build.py", line 207, in run
      self.extensions = cythonize(self._make_extensions(config),
    File "/home/yu/venv/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize
      cythonize_one(*args)
    File "/home/yu/venv/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one
      raise CompileError(None, pyx_file)
  Cython.Compiler.Errors.CompileError: /tmp/pip-install-qpnjl6me/h5py_53690c65174c42f1bd5fe2bc944dc6b0/h5py/_conv.pyx
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for h5py Running setup.py clean for h5py Failed to build h5py ERROR: Could not build wheels for h5py, which is required to install pyproject.toml-based projects

jimmykimmy68 commented 7 months ago

The same issue happened to me; is this solved?

NganAmy commented 7 months ago

Same issue

FRANCHI-Charles commented 6 months ago

I find the solution in my case on https://github.com/dusty-nv/jetson-containers/issues/265. Before running

pip install kfac

Do

pip3 install 'Cython<3'

I'm not sure exactly why it worked, it seems the setup.py file use depreciated syntax of Cython.