jetson-containers icon indicating copy to clipboard operation
jetson-containers copied to clipboard

Build error while execute ./scripts/docker_build_ml.sh tensorflow in nVidia Jason Nano device

Open JackiePei61 opened this issue 2 years ago • 2 comments

From error message, any command or instruction I need to perform?

Thanks for help.

ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8j3g4s5v/h5py/setup.py'"'"'; file='"'"'/tmp/pip-install-8j3g4s5v/h5py/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-record-yl2dyow0/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/h5py Check the logs for full command output.

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 1, in <module>
  File "/tmp/pip-install-8j3g4s5v/h5py/setup.py", line 140, in <module>
    setup(
  File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 144, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 61, in run
    return orig.install.run(self)
  File "/usr/lib/python3.8/distutils/command/install.py", line 589, in run
    self.run_command('build')
  File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/tmp/pip-install-8j3g4s5v/h5py/setup_build.py", line 207, in run
    self.extensions = cythonize(self._make_extensions(config),
  File "/usr/local/lib/python3.8/dist-packages/Cython/Build/Dependencies.py", line 1134, in cythonize
    cythonize_one(*args)
  File "/usr/local/lib/python3.8/dist-packages/Cython/Build/Dependencies.py", line 1301, in cythonize_one
    raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: /tmp/pip-install-8j3g4s5v/h5py/h5py/_conv.pyx

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 "", line 1, in File "/tmp/pip-install-8j3g4s5v/h5py/setup.py", line 140, in setup( File "/usr/lib/python3/dist-packages/setuptools/init.py", line 144, in setup return distutils.core.setup(**attrs) File "/usr/lib/python3.8/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 223, in run self.run_command('build') File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/tmp/pip-install-8j3g4s5v/h5py/setup_build.py", line 207, in run self.extensions = cythonize(self._make_extensions(config), File "/usr/local/lib/python3.8/dist-packages/Cython/Build/Dependencies.py", line 1134, in cythonize cythonize_one(*args) File "/usr/local/lib/python3.8/dist-packages/Cython/Build/Dependencies.py", line 1301, in cythonize_one raise CompileError(None, pyx_file) Cython.Compiler.Errors.CompileError: /tmp/pip-install-8j3g4s5v/h5py/h5py/_conv.pyx Building wheel for h5py (setup.py): finished with status 'error' ERROR: Failed building wheel for h5py

JackiePei61 avatar Jul 26 '23 04:07 JackiePei61

same question

CarkusL avatar Aug 14 '23 08:08 CarkusL

@CarkusL @JackiePei61 try pip3 install 'Cython<3' in the container first

These dockerfiles/ect have been refactored are are passing builds on JetPack 4.6 / JetPack 5.1

https://github.com/dusty-nv/jetson-containers/tree/master/packages/l4t/l4t-tensorflow

dusty-nv avatar Aug 14 '23 17:08 dusty-nv