explosion / explosion/thinc-apple-ops

Error while trying to install on Apple M4

Open
#43 3 comments 6 reactions 0 assignees View on GitHub
Dominant language
Cython
Stars
103
Forks
10
PR merge metrics
No merged PRs in 30d

Description

```
Using Python 3.13.9 environment at: /Users/rafi/.local/share/mise/installs/python/3.13.9
Resolved 18 packages in 16ms
× Failed to build `thinc-apple-ops==1.0.0`
├─▶ The build backend returned an error
╰─▶ Call to `setuptools.build_meta.build_wheel` failed (exit status: 1)

[stdout]
Compiling thinc_apple_ops/ops.pyx because it changed.
[1/1] Cythonizing thinc_apple_ops/ops.pyx

[stderr]

Error compiling Cython file:
------------------------------------------------------------
...
name = "apple"
xp = numpy

def cblas(self) -> CBlas:
cdef CBlas cblas = CBlas()
set_saxpy(cblas, saxpy)
^
------------------------------------------------------------
thinc_apple_ops/ops.pyx:18:25: Cannot assign type 'void (int, float, const float *, int, float *, int) except * nogil' to 'saxpy_ptr'
(alias of 'void (*)(int, float, const float *, int, float *, int) noexcept nogil'). Exception values are incompatible. Suggest adding
'noexcept' to the type of 'saxpy'.

Error compiling Cython file:
------------------------------------------------------------
...
xp = numpy

def cblas(self) -> CBlas:
cdef CBlas cblas = CBlas()
set_saxpy(cblas, saxpy)
set_sgemm(cblas, sgemm)
^
------------------------------------------------------------
thinc_apple_ops/ops.pyx:19:25: Cannot assign type 'void (bool, bool, int, int, int, float, const float *, int, const float *, int, float,
float *, int) except * nogil' to 'sgemm_ptr' (alias of 'void (*)(bool, bool, int, int, int, float, const float *, int, const float *,
int, float, float *, int) noexcept nogil'). Exception values are incompatible. Suggest adding 'noexcept' to the type of 'sgemm'.
Traceback (most recent call last):
File "", line 14, in
requires = get_requires_for_build({})
File "/Users/rafi/.cache/uv/builds-v0/.tmpuDnJXr/lib/python3.13/site-packages/setuptools/build_meta.py", line 331, in
get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/rafi/.cache/uv/builds-v0/.tmpuDnJXr/lib/python3.13/site-packages/setuptools/build_meta.py", line 301, in
_get_build_requires
self.run_setup()
~~~~~~~~~~~~~~^^
File "/Users/rafi/.cache/uv/builds-v0/.tmpuDnJXr/lib/python3.13/site-packages/setuptools/build_meta.py", line 317, in run_setup
exec(code, locals())
~~~~^^^^^^^^^^^^^^^^
File "", line 50, in
File "", line 45, in setup_package
File "/Users/rafi/.cache/uv/builds-v0/.tmpuDnJXr/lib/python3.13/site-packages/Cython/Build/Dependencies.py", line 1153, in cythonize
cythonize_one(*args)
~~~~~~~~~~~~~^^^^^^^
File "/Users/rafi/.cache/uv/builds-v0/.tmpuDnJXr/lib/python3.13/site-packages/Cython/Build/Dependencies.py", line 1297, in
cythonize_one
raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: thinc_apple_ops/ops.pyx

hint: This usually indicates a problem with the package or the build environment.
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.