swiftdyldcreateml

CreateML error dyld: Library not loaded: @rpath/libswiftCreateML.dylib


I have been trying to create a model but the code seems to fail at the instantiation of the very first MLDataTable object with an error code I cannot figure out how to resolve.

Error report:

dyld: Library not loaded: @rpath/libswiftCreateML.dylib
  Referenced from: /Users/ritwikpimac/Library/Developer/Xcode/DerivedData/Billions-epqozturxqfhiwcinwrbmmhqavnj/Build/Products/Debug/Billions.app/Contents/MacOS/Billions
  Reason: image not found

Any help would be appreciated


Solution

  • I also ran in to this issue on a project that had been running and using this library without issue for months. Here is what worked for me:

    Select your target, and under the "General" tab go to "Frameworks, Libraries, and Embedded Content" (see the screenshot below). Here you can add "libSwiftCreateML.dylib".

    Screenshot