cc1234475 / stash-plugin-performer-creator

User Natural Language Processing to extract performers from file names for StashApp
GNU Affero General Public License v3.0
40 stars 6 forks source link

Error while building during the requirements installation on UNraid ... error building "thinc" #10

Open stevenmcastano opened 6 months ago

stevenmcastano commented 6 months ago

It looks like the requirements are unable to install due to an error building out of the python components... thinc ... here is the stack trace from the error:

~/.stash/plugins/stash-plugin-performer-creator # python -m pip install -r requirements.txt
error: externally-managed-environment

× This environment is externally managed
(env) ~/.stash/plugins/stash-plugin-performer-creator # python -m pip install -r requirements.txt
Collecting requests==2.25.1 (from -r requirements.txt (line 1))
  Using cached requests-2.25.1-py2.py3-none-any.whl.metadata (4.2 kB)
Collecting spacy==2.3.9 (from -r requirements.txt (line 2))
  Using cached spacy-2.3.9.tar.gz (1.0 MB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [298 lines of output]
      Collecting setuptools
        Using cached setuptools-69.5.1-py3-none-any.whl.metadata (6.2 kB)
      Collecting cython<3.0,>=0.25
        Using cached Cython-0.29.37-cp311-cp311-musllinux_1_1_x86_64.whl.metadata (3.1 kB)
      Collecting cymem<2.1.0,>=2.0.2
        Using cached cymem-2.0.8-cp311-cp311-linux_x86_64.whl
      Collecting preshed<3.1.0,>=3.0.2
        Using cached preshed-3.0.9-cp311-cp311-linux_x86_64.whl
      Collecting murmurhash<1.1.0,>=0.28.0
        Using cached murmurhash-1.0.10-cp311-cp311-linux_x86_64.whl
      Collecting thinc<7.5.0,>=7.4.1
        Using cached thinc-7.4.6.tar.gz (1.3 MB)
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'error'
        error: subprocess-exited-with-error

        × Getting requirements to build wheel did not run successfully.
        │ exit code: 1
        ╰─> [267 lines of output]

            Error compiling Cython file:
            ------------------------------------------------------------
            ...
                len_t* widths
                int i
                int nr_layer
                int batch_size

                __init__(len_t* widths, int nr_layer, int batch_size) nogil:
                ^
            ------------------------------------------------------------

            thinc/structs.pxd:140:4: function definition in pxd file must be declared 'cdef inline'

            Error compiling Cython file:
            ------------------------------------------------------------
            ...
                    this._nr_feat = <len_t*>calloc(batch_size, sizeof(len_t))
                    this._is_valid = <int*>calloc(batch_size * widths[nr_layer-1], sizeof(int))
                    this._costs = <weight_t*>calloc(batch_size * widths[nr_layer-1], sizeof(weight_t))
                    this.signatures = <uint64_t*>calloc(batch_size, sizeof(uint64_t))

                __dealloc__() nogil:
                ^
            ------------------------------------------------------------

            thinc/structs.pxd:157:4: function definition in pxd file must be declared 'cdef inline'

            Error compiling Cython file:
            ------------------------------------------------------------
            ...
                    free(this._nr_feat)
                    free(this._is_valid)
                    free(this._costs)
                    free(this.signatures)

                void reset() nogil:
                ^
            ------------------------------------------------------------

            thinc/structs.pxd:172:4: function definition in pxd file must be declared 'cdef inline'

            Error compiling Cython file:
            ------------------------------------------------------------
            ...
                    for i in range(this.i):
                        free(this._feats[i])
                        this._feats[i] = NULL
                    this.i = 0

                int nr_in() nogil:
                ^
            ------------------------------------------------------------

            thinc/structs.pxd:189:4: function definition in pxd file must be declared 'cdef inline'

            Error compiling Cython file:
            ------------------------------------------------------------
            ...
                    this.i = 0

                int nr_in() nogil:
                    return this.widths[0]

                int nr_out() nogil:
                ^
            ------------------------------------------------------------

            thinc/structs.pxd:192:4: function definition in pxd file must be declared 'cdef inline'

            Error compiling Cython file:
            ------------------------------------------------------------
            ...
                    return this.widths[0]

                int nr_out() nogil:
                    return this.widths[this.nr_layer - 1]

                int push_back(const FeatureC* feats, int nr_feat,
                ^
            ------------------------------------------------------------

            thinc/structs.pxd:195:4: function definition in pxd file must be declared 'cdef inline'

            Error compiling Cython file:
            ------------------------------------------------------------
            ...
                        for i in range(this.nr_out()):
                            this.is_valid(this.i)[i] = 1
                    this.i += 1
                    return this.i >= this.batch_size

                FeatureC* features(int i) nogil:
                ^
            ------------------------------------------------------------

            thinc/structs.pxd:226:4: function definition in pxd file must be declared 'cdef inline'

            Error compiling Cython file:
            ------------------------------------------------------------
            ...
                    return this.i >= this.batch_size

                FeatureC* features(int i) nogil:
                    return this._feats[i]

                int nr_feat(int i) nogil:
                ^
            ------------------------------------------------------------

            thinc/structs.pxd:229:4: function definition in pxd file must be declared 'cdef inline'

            Error compiling Cython file:
            ------------------------------------------------------------
            ...
                    return this._feats[i]

                int nr_feat(int i) nogil:
                    return this._nr_feat[i]

                weight_t* fwd(int i, int j) nogil:
                ^
            ------------------------------------------------------------

            thinc/structs.pxd:232:4: function definition in pxd file must be declared 'cdef inline'

            Error compiling Cython file:
            ------------------------------------------------------------
            ...
                    return this._nr_feat[i]

                weight_t* fwd(int i, int j) nogil:
                    return this._fwd[i] + (j * this.widths[i])

                weight_t* bwd(int i, int j) nogil:
                ^
            ------------------------------------------------------------

            thinc/structs.pxd:235:4: function definition in pxd file must be declared 'cdef inline'

            Error compiling Cython file:
            ------------------------------------------------------------
            ...
                    return this._fwd[i] + (j * this.widths[i])

                weight_t* bwd(int i, int j) nogil:
                    return this._bwd[i] + (j * this.widths[i])

                weight_t* scores(int i) nogil:
                ^
            ------------------------------------------------------------

            thinc/structs.pxd:238:4: function definition in pxd file must be declared 'cdef inline'

            Error compiling Cython file:
            ------------------------------------------------------------
            ...
                    return this._bwd[i] + (j * this.widths[i])

                weight_t* scores(int i) nogil:
                    return this.fwd(this.nr_layer-1, i)

                weight_t* losses(int i) nogil:
                ^
            ------------------------------------------------------------

            thinc/structs.pxd:241:4: function definition in pxd file must be declared 'cdef inline'

            Error compiling Cython file:
            ------------------------------------------------------------
            ...
                    return this.fwd(this.nr_layer-1, i)

                weight_t* losses(int i) nogil:
                    return this.bwd(this.nr_layer-1, i)

                weight_t* costs(int i) nogil:
                ^
            ------------------------------------------------------------

            thinc/structs.pxd:244:4: function definition in pxd file must be declared 'cdef inline'

            Error compiling Cython file:
            ------------------------------------------------------------
            ...
                    return this.bwd(this.nr_layer-1, i)

                weight_t* costs(int i) nogil:
                    return this._costs + (i * this.nr_out())

                int* is_valid(int i) nogil:
                ^
            ------------------------------------------------------------

            thinc/structs.pxd:247:4: function definition in pxd file must be declared 'cdef inline'

            Error compiling Cython file:
            ------------------------------------------------------------
            ...
                    return this._costs + (i * this.nr_out())

                int* is_valid(int i) nogil:
                    return this._is_valid + (i * this.nr_out())

                int guess(int i) nogil:
                ^
            ------------------------------------------------------------

            thinc/structs.pxd:250:4: function definition in pxd file must be declared 'cdef inline'

            Error compiling Cython file:
            ------------------------------------------------------------
            ...
                    return this._is_valid + (i * this.nr_out())

                int guess(int i) nogil:
                    return VecVec.arg_max_if_true(this.scores(i), this.is_valid(i), this.nr_out())

                int best(int i) nogil:
                ^
            ------------------------------------------------------------

            thinc/structs.pxd:253:4: function definition in pxd file must be declared 'cdef inline'
            warning: thinc/linalg.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: thinc/linalg.pxd:90:8: 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: thinc/linalg.pxd:174:8: 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
            Compiling thinc/linalg.pyx because it changed.
            Compiling thinc/structs.pyx because it changed.
            Compiling thinc/typedefs.pyx because it changed.
            Compiling thinc/linear/avgtron.pyx because it changed.
            Compiling thinc/linear/features.pyx because it changed.
            Compiling thinc/linear/serialize.pyx because it changed.
            Compiling thinc/linear/sparse.pyx because it changed.
            Compiling thinc/linear/linear.pyx because it changed.
            Compiling thinc/neural/optimizers.pyx because it changed.
            Compiling thinc/neural/ops.pyx because it changed.
            Compiling thinc/neural/_aligned_alloc.pyx because it changed.
            Compiling thinc/extra/eg.pyx because it changed.
            Compiling thinc/extra/mb.pyx because it changed.
            Compiling thinc/extra/search.pyx because it changed.
            Compiling thinc/extra/cache.pyx because it changed.
            [ 1/15] Cythonizing thinc/extra/cache.pyx
            [ 2/15] Cythonizing thinc/extra/eg.pyx
            Traceback (most recent call last):
              File "/root/.stash/plugins/stash-plugin-performer-creator/env/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
                main()
              File "/root/.stash/plugins/stash-plugin-performer-creator/env/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
                json_out['return_val'] = hook(**hook_input['kwargs'])
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              File "/root/.stash/plugins/stash-plugin-performer-creator/env/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
                return hook(config_settings)
                       ^^^^^^^^^^^^^^^^^^^^^
              File "/tmp/pip-build-env-gi9ntlpx/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
                return self._get_build_requires(config_settings, requirements=['wheel'])
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              File "/tmp/pip-build-env-gi9ntlpx/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
                self.run_setup()
              File "/tmp/pip-build-env-gi9ntlpx/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
                exec(code, locals())
              File "<string>", line 258, in <module>
              File "<string>", line 195, in setup_package
              File "/tmp/pip-build-env-gi9ntlpx/overlay/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize
                cythonize_one(*args)
              File "/tmp/pip-build-env-gi9ntlpx/overlay/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one
                raise CompileError(None, pyx_file)
            Cython.Compiler.Errors.CompileError: thinc/extra/eg.pyx
            [end of output]

        note: This error originates from a subprocess, and is likely not a problem with pip.
      error: subprocess-exited-with-error

      × Getting requirements to build wheel did not run successfully.
      │ exit code: 1
      ╰─> See above for output.

      note: This error originates from a subprocess, and is likely not a problem with pip.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.