Hi there,
I’m writing a script that needs to import either lightgbm or scikit-learn. Former is preferred.
I first tried adding lightgbm to requirements.txt, but got this error in the logs:
2025-09-12 23:09:50.246 ERROR (SyncWorker_3) [homeassistant.util.package] Unable to install package lightgbm: × Failed to build `lightgbm==4.6.0`
├─▶ The build backend returned an error
╰─▶ Call to `scikit_build_core.build.build_wheel` failed (exit status: 1)
[stderr]
2025-09-12 23:09:50,162 - scikit_build_core - INFO - RUN:
/tmp/.tmphLEqcO/builds-v0/.tmpp1MQQh/lib/python3.13/site-packages/cmake/data/bin/cmake
-E capabilities
2025-09-12 23:09:50,162 - scikit_build_core - WARNING - Permissions
Error getting CMake's version
Traceback (most recent call last):
File "<string>", line 11, in <module>
wheel_filename =
backend.build_wheel("/tmp/.tmphLEqcO/builds-v0/.tmpmeEcVF", {}, None)
File
"/tmp/.tmphLEqcO/builds-v0/.tmpp1MQQh/lib/python3.13/site-packages/scikit_build_core/build/__init__.py",
line 33, in build_wheel
return _build_wheel_impl(
~~~~~~~~~~~~~~~~~^
wheel_directory,
^^^^^^^^^^^^^^^^
...<2 lines>...
editable=False,
^^^^^^^^^^^^^^^
).wheel_filename
^
File
"/tmp/.tmphLEqcO/builds-v0/.tmpp1MQQh/lib/python3.13/site-packages/scikit_build_core/build/wheel.py",
line 176, in _build_wheel_impl
return _build_wheel_impl_impl(
wheel_directory,
...<5 lines>...
pyproject=pyproject,
)
File
"/tmp/.tmphLEqcO/builds-v0/.tmpp1MQQh/lib/python3.13/site-packages/scikit_build_core/build/wheel.py",
line 248, in _build_wheel_impl_impl
cmake = CMake.default_search(version=settings.cmake.version,
env=os.environ)
File
"/tmp/.tmphLEqcO/builds-v0/.tmpp1MQQh/lib/python3.13/site-packages/scikit_build_core/cmake.py",
line 67, in default_search
raise CMakeNotFoundError(msg)
scikit_build_core.errors.CMakeNotFoundError: Could not find CMake with
version >=3.28
hint: This usually indicates a problem with the package or the build
environment.
I then tried using scikit-learn instead, and got the following error:
2025-09-12 23:18:59.197 ERROR (SyncWorker_0) [homeassistant.util.package] Unable to install package scikit-learn: × Failed to build `scikit-learn==1.7.2`
├─▶ The build backend returned an error
╰─▶ Call to `mesonpy.build_wheel` failed (exit status: 1)
[stderr]
Traceback (most recent call last):
File "<string>", line 11, in <module>
wheel_filename =
backend.build_wheel("/tmp/.tmpgsJJJY/builds-v0/.tmpfKJsBv", {}, None)
File
"/tmp/.tmpgsJJJY/builds-v0/.tmpT0aAkN/lib/python3.13/site-packages/mesonpy/__init__.py",
line 1144, in wrapper
return func(*args, **kwargs)
File
"/tmp/.tmpgsJJJY/builds-v0/.tmpT0aAkN/lib/python3.13/site-packages/mesonpy/__init__.py",
line 1197, in build_wheel
with _project(config_settings) as project:
~~~~~~~~^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/contextlib.py", line 141, in __enter__
return next(self.gen)
File
"/tmp/.tmpgsJJJY/builds-v0/.tmpT0aAkN/lib/python3.13/site-packages/mesonpy/__init__.py",
line 1063, in _project
yield Project(source_dir, build_dir, meson_args, editable_verbose)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/tmp/.tmpgsJJJY/builds-v0/.tmpT0aAkN/lib/python3.13/site-packages/mesonpy/__init__.py",
line 673, in __init__
self._meson = _get_meson_command(pyproject_config.get('meson'))
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/tmp/.tmpgsJJJY/builds-v0/.tmpT0aAkN/lib/python3.13/site-packages/mesonpy/__init__.py",
line 1100, in _get_meson_command
r = subprocess.run(cmd + ['--version'], text=True,
capture_output=True)
File "/usr/local/lib/python3.13/subprocess.py", line 554, in run
with Popen(*popenargs, **kwargs) as process:
~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/subprocess.py", line 1039, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pass_fds, cwd, env,
^^^^^^^^^^^^^^^^^^^
...<5 lines>...
gid, gids, uid, umask,
^^^^^^^^^^^^^^^^^^^^^^
start_new_session, process_group)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/subprocess.py", line 1972, in
_execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: 'meson'
hint: This usually indicates a problem with the package or the build
environment.
Any idea what I’m doing wrong here?
Thanks!