Skip to content

"Could not find module 'ggml.dll' " when trying to run the Python bindings example on Windows #109

@Edward205

Description

@Edward205

I'm trying to use this library on Windows. I've built the library with cmake and mingw.

I put the DLLs in examples/python_bindings/clip_cpp as the documentation suggests, I also tried in the folder of the Python script and in the \.venv\Lib\site-packages\clip_cpp folder and the error still occured. I've also tried manually setting the path of the DLL but the error persisted.

This is the error I encounter when I try to run the example:

PS C:\Users\edward\Documents\cod\clip.cpp\examples\python_bindings> python example_main.py
Traceback (most recent call last):
  File "C:\Users\edward\Documents\cod\clip.cpp\examples\python_bindings\example_main.py", line 3, in <module>
    from clip_cpp import Clip
  File "C:\Users\edward\Documents\cod\clip.cpp\examples\python_bindings\clip_cpp\__init__.py", line 1, in <module>
    from .clip import Clip
    ggml_lib = ctypes.CDLL(ggml_lib_path)
  File "C:\Users\edward\AppData\Local\Programs\Python\Python313\Lib\ctypes\__init__.py", line 390, in __init__
    self._handle = _dlopen(self._name, mode)
                   ~~~~~~~^^^^^^^^^^^^^^^^^^
FileNotFoundError: Could not find module 'ggml.dll' (or one of its dependencies). Try using the full path with constructor syntax.

Image

libclip.dll and libggml.dll are what the build process produced, I copied them to clip.dll and ggml.dll to ensure that they are read. I believe I have all the dependencies, given I built it. If more details are needed I would be glad to provide them. Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions