条件
pg:官网下载
vector源代码:git上下载:GitHub - pgvector/pgvector: Open-source vector similarity search for Postgres · GitHub
x64 Native Tools Command Prompt for VS [version] (我这里是2022)
命令执行
--指定你的tool位置,用call唤起
call "D:\Program Files\Microsoft Visual Studio\2022\Community\"
--指定pg位置
set "PGROOT=C:\Program Files\PostgreSQL\18"
--找一个目录,用于放vector的代码
cd %TEMP%
--下载代码
git clone --branch v0.8.2 https://github.com/pgvector/pgvector.git cd pgvector --版本可以指定
--在代码根目录有.win文件,作为命令的执行目标
nmake /F Makefile.win
nmake /F Makefile.win install