sqlite-vec: Pre-compiled loadable extension won't load on Python (3.10.8, Win11)

Trying to load the extension manually like so:

conn.enable_load_extension(True)
conn.load_extension("vec0.dll")
conn.enable_load_extension(False)

Results in the following error:

OperationalError: Não foi possível encontrar o módulo especificado.

Which roughly translates to “The specified module could not be found”. Specifying the full path to the file does not work either.

It could have to do with the sqlite3 DLL that comes with Python and the extension DLL being built using different compilers. I tried builting the extension myself with MSVC, using the following command:

cl -W -I.\sqlite-autoconf sqlite-vec.c sqlite-vec.h -O2

But this fails with lots of syntax (“initializer is not const”, etc.) and linking errors.

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 22 (8 by maintainers)

Most upvoted comments

@tkswanson (and anyone else who’s having Python/windows issues): can you try v0.1.2-alpha.9 and let me know if it works?

I’ve completely moved off mingw and now use the msvc compiler starting with this release, so if it works, I’ll publish a 0.1.2 with the change.