I am trying to use PostgreSQL as a vector database. And for the same I installed PostgreSQL to my windows system using the instructions provided here.
To install pgvector, I followed the instructions given in this page.
I am trying to complete this setup in a remote machine with Windows Server 2016 OS. PostgreSQL version: 15.3
I was unable to successfully install the pgvector extension.
Upon running the nmake /F Makefile.win
command, I get the following error:
fatal error C1083: Cannot open include file ‘crtdefs.h’: No such file or directory
I tried installing using conda as well. command: conda install -c conda-forge pgvector The error obtained when creating vector extension after installation using conda is as follows:
EDIT 1: Updating the post based on the following question.
Where is the file crtdefs.h on your system? (There could be several of these.) What is the value of the INCLUDE environment variable when cl.exe is called?
crtdefs.h file location: C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.36.32532\include
Earlier I didn't have the INCLUDE env variable added. Now, I added the INCLUDE and LIB environment variables based on certain similar errors (cannot open include/lib file). I had to respectively add include and lib paths from Microsoft Visual studio and Windows Kits. Now upon running the nmake /F Makefile.win
command, I get the following error.
fatal error LNK1104: cannot open file 'vector.dll'
vector.dll file is not present in the cloned pgvector folder.
Any help with regards to completing installation using nmake or resolve the error while creating the vector extension will be greatly appreciated. Thanks!