Skip to content

Microsoft.ML.LightGbm not supported on Mac M1 – 'lib_lightgbm' (no such file) #7495

Closed

Description

@games

System Information (please complete the following information):

  • OS & Version: macOS 15.6
  • ML.NET Version: ML.NET v4.0.2
  • .NET Version: .NET 9.0

Describe the bug
When attempting to use Microsoft.ML.LightGbm on an Apple Silicon Mac (M1), the package fails to load due to a missing native library dependency. The error message is:

Unhandled exception. System.DllNotFoundException: Unable to load shared library 'lib_lightgbm' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable

To Reproduce
Steps to reproduce the behavior:

  1. dotnet new console
  2. add packages
  3. copy the sample code from here (https://learn.microsoft.com/en-us/dotnet/api/microsoft.ml.lightgbmextensions.lightgbm?view=ml-dotnet-preview)
  4. dotnet run
  5. see error: unhandled exception. System.DllNotFoundException: Unable to load shared library 'lib_lightgbm' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable:

Expected behavior
LightGBM should run on Mac M1

Screenshots, Code, Sample Projects
packages version

    <PackageReference Include="Microsoft.ML" Version="4.0.2" />
    <PackageReference Include="Microsoft.ML.LightGbm" Version="4.0.2" />

Additional context

lib_lightgbm.dylib is missing in osx-arm64

Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions