thinc-apple-ops
thinc-apple-ops copied to clipboard
Error while trying to install on Apple M4
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 "<string>", line 14, in <module>
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 "<string>", line 50, in <module>
File "<string>", 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.
Hi @honnibal can you take a look at this when you get time?
I'm facing the same issue with installation on M4 Pro chip:
Using Python 3.13.10 environment at: .temp
Resolved 18 packages in 2.83s
× 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 "<string>", line 14, in <module>
requires = get_requires_for_build({})
File "/Users/user/.cache/uv/builds-v0/.tmpaE5bmI/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/user/.cache/uv/builds-v0/.tmpaE5bmI/lib/python3.13/site-packages/setuptools/build_meta.py", line 301,
in _get_build_requires
self.run_setup()
~~~~~~~~~~~~~~^^
File "/Users/user/.cache/uv/builds-v0/.tmpaE5bmI/lib/python3.13/site-packages/setuptools/build_meta.py", line 317,
in run_setup
exec(code, locals())
~~~~^^^^^^^^^^^^^^^^
File "<string>", line 50, in <module>
File "<string>", line 45, in setup_package
File "/Users/user/.cache/uv/builds-v0/.tmpaE5bmI/lib/python3.13/site-packages/Cython/Build/Dependencies.py", line
1153, in cythonize
cythonize_one(*args)
~~~~~~~~~~~~~^^^^^^^
File "/Users/user/.cache/uv/builds-v0/.tmpaE5bmI/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.