pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
[pgvector/pgvector] issue #870: cant install pgvector on windows
12+ messages / 8 participants
[nested] [flat]

* [pgvector/pgvector] issue #870: cant install pgvector on windows
@ 2025-07-03 11:45 "bloodykheeng (@bloodykheeng)" <noreply+bloodykheeng@github.com>
  0 siblings, 0 replies; 12+ messages in thread

From: bloodykheeng (@bloodykheeng) @ 2025-07-03 11:45 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

i installed visual studio 2022 build tools and lanched the terminal through it
i also installed posgresql using laragon software

but when i follow the installation commands nmake is failing to work

these are the commands i ran

```
set "PGROOT=C:\Program Files\PostgreSQL\17"
cd %TEMP%
git clone --branch v0.8.0 https://github.com/pgvector/pgvector.git
cd pgvector
nmake /F Makefile.win
nmake /F Makefile.win install
```

this is the error am getting
```
C:\Users\BK\AppData\Local\Temp\pgvector>nmake /F Makefile.win

Microsoft (R) Program Maintenance Utility Version 14.44.35211.0
Copyright (C) Microsoft Corporation.  All rights reserved.

        cl /nologo /I"C:\Program Files\PostgreSQL\17\include\server\port\win32_msvc" /I"C:\Program Files\PostgreSQL\17\include\server\port\win32" /I"C:\Program Files\PostgreSQL\17\include\server" /I"C:\Program Files\PostgreSQL\17\include"   /O2 /fp:fast /c src\bitutils.c /Fosrc\bitutils.obj
bitutils.c
src\bitutils.c(1): fatal error C1083: Cannot open include file: 'postgres.h': No such file or directory
NMAKE : fatal error U1077: 'cl /nologo /I"C:\Program Files\PostgreSQL\17\include\server\port\win32_msvc" /I"C:\Program Files\PostgreSQL\17\include\server\port\win32" /I"C:\Program Files\PostgreSQL\17\include\server" /I"C:\Program Files\PostgreSQL\17\include"   /O2 /fp:fast /c src\bitutils.c /Fosrc\bitutils.obj' : return code '0x2'
Stop.
```

this is the folder path when i extracted postgresql zip file
```
C:\laragon\bin\postgresql\postgresql-17.5-2
```

my postgresql is working well with laragon just am not getting it why nmake is failing to build

^ permalink  raw  [nested|flat] 12+ messages in thread

* Re: [pgvector/pgvector] issue #870: cant install pgvector on windows
@ 2025-07-03 11:57 ` "bloodykheeng (@bloodykheeng)" <noreply+bloodykheeng@github.com>
  10 siblings, 0 replies; 12+ messages in thread

From: bloodykheeng (@bloodykheeng) @ 2025-07-03 11:57 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

so ive changed my pg root as the docs say and ive got a new error now
this is how ive changed it

```
set "PGROOT=C:\laragon\bin\postgresql\postgresql-17.5-2"
cd %TEMP%
git clone --branch v0.8.0 https://github.com/pgvector/pgvector.git
cd pgvector
nmake /F Makefile.win
nmake /F Makefile.win install
```

this is the error ive got
```
C:\Users\BK\AppData\Local\Temp\pgvector>set "PGROOT=C:\laragon\bin\postgresql\postgresql-17.5-2"

C:\Users\BK\AppData\Local\Temp\pgvector>cd %TEMP%

C:\Users\BK\AppData\Local\Temp>cd pgvector

C:\Users\BK\AppData\Local\Temp\pgvector>nmake /F Makefile.win

Microsoft (R) Program Maintenance Utility Version 14.44.35211.0
Copyright (C) Microsoft Corporation.  All rights reserved.

        cl /nologo /I"C:\laragon\bin\postgresql\postgresql-17.5-2\include\server\port\win32_msvc" /I"C:\laragon\bin\postgresql\postgresql-17.5-2\include\server\port\win32" /I"C:\laragon\bin\postgresql\postgresql-17.5-2\include\server" /I"C:\laragon\bin\postgresql\postgresql-17.5-2\include"   /O2 /fp:fast /c src\bitutils.c /Fosrc\bitutils.obj
bitutils.c
        cl /nologo /I"C:\laragon\bin\postgresql\postgresql-17.5-2\include\server\port\win32_msvc" /I"C:\laragon\bin\postgresql\postgresql-17.5-2\include\server\port\win32" /I"C:\laragon\bin\postgresql\postgresql-17.5-2\include\server" /I"C:\laragon\bin\postgresql\postgresql-17.5-2\include"   /O2 /fp:fast /c src\bitvec.c /Fosrc\bitvec.obj
bitvec.c
        cl /nologo /I"C:\laragon\bin\postgresql\postgresql-17.5-2\include\server\port\win32_msvc" /I"C:\laragon\bin\postgresql\postgresql-17.5-2\include\server\port\win32" /I"C:\laragon\bin\postgresql\postgresql-17.5-2\include\server" /I"C:\laragon\bin\postgresql\postgresql-17.5-2\include"   /O2 /fp:fast /c src\halfutils.c /Fosrc\halfutils.obj
halfutils.c
        cl /nologo /I"C:\laragon\bin\postgresql\postgresql-17.5-2\include\server\port\win32_msvc" /I"C:\laragon\bin\postgresql\postgresql-17.5-2\include\server\port\win32" /I"C:\laragon\bin\postgresql\postgresql-17.5-2\include\server" /I"C:\laragon\bin\postgresql\postgresql-17.5-2\include"   /O2 /fp:fast /c src\halfvec.c /Fosrc\halfvec.obj
halfvec.c
        cl /nologo /I"C:\laragon\bin\postgresql\postgresql-17.5-2\include\server\port\win32_msvc" /I"C:\laragon\bin\postgresql\postgresql-17.5-2\include\server\port\win32" /I"C:\laragon\bin\postgresql\postgresql-17.5-2\include\server" /I"C:\laragon\bin\postgresql\postgresql-17.5-2\include"   /O2 /fp:fast /c src\hnsw.c /Fosrc\hnsw.obj
hnsw.c
C:\laragon\bin\postgresql\postgresql-17.5-2\include\server\access/tupmacs.h(65): error C2196: case value '4' already used
C:\laragon\bin\postgresql\postgresql-17.5-2\include\server\access/tupmacs.h(197): error C2196: case value '4' already used
NMAKE : fatal error U1077: 'cl /nologo /I"C:\laragon\bin\postgresql\postgresql-17.5-2\include\server\port\win32_msvc" /I"C:\laragon\bin\postgresql\postgresql-17.5-2\include\server\port\win32" /I"C:\laragon\bin\postgresql\postgresql-17.5-2\include\server" /I"C:\laragon\bin\postgresql\postgresql-17.5-2\include"   /O2 /fp:fast /c src\hnsw.c /Fosrc\hnsw.obj' : return code '0x2'
Stop.
```

^ permalink  raw  [nested|flat] 12+ messages in thread

* Re: [pgvector/pgvector] issue #870: cant install pgvector on windows
@ 2025-07-03 12:04 ` "bloodykheeng (@bloodykheeng)" <noreply+bloodykheeng@github.com>
  10 siblings, 0 replies; 12+ messages in thread

From: bloodykheeng (@bloodykheeng) @ 2025-07-03 12:04 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

so what i did to solve the above error is 
I had to use the x64 Native Tools Command Prompt specifically

so i searched for "x64 Native Tools Command Prompt for VS 2022" in the Start menu
then opened it and i ran these commands

```
set "PGROOT=C:\laragon\bin\postgresql\postgresql-17.5-2"
cd %TEMP%\pgvector
nmake /F Makefile.win clean
nmake /F Makefile.win
nmake /F Makefile.win install
```

After battling for a whole day and night with pgvector on Windows 11... πŸ₯΅βš”οΈπŸ§ 

Hooray! It's finally installed successfully! πŸŽ‰πŸ’ͺπŸš€

^ permalink  raw  [nested|flat] 12+ messages in thread

* Re: [pgvector/pgvector] issue #870: cant install pgvector on windows
@ 2025-07-03 13:48 ` "ankane (@ankane)" <noreply+ankane@github.com>
  10 siblings, 0 replies; 12+ messages in thread

From: ankane (@ankane) @ 2025-07-03 13:48 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

@ankane closed this.

^ permalink  raw  [nested|flat] 12+ messages in thread

* Re: [pgvector/pgvector] issue #870: cant install pgvector on windows
@ 2025-07-10 11:15 ` "GhosT-FlexAgen (@GhosT-FlexAgen)" <noreply+GhosT-FlexAgen@github.com>
  10 siblings, 0 replies; 12+ messages in thread

From: GhosT-FlexAgen (@GhosT-FlexAgen) @ 2025-07-10 11:15 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

Thank you very much! It's work also for me 

^ permalink  raw  [nested|flat] 12+ messages in thread

* Re: [pgvector/pgvector] issue #870: cant install pgvector on windows
@ 2025-07-15 05:29 ` "renzer19 (@renzer19)" <noreply+renzer19@github.com>
  10 siblings, 0 replies; 12+ messages in thread

From: renzer19 (@renzer19) @ 2025-07-15 05:29 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

WORKS FOR ME THANK YOU

^ permalink  raw  [nested|flat] 12+ messages in thread

* Re: [pgvector/pgvector] issue #870: cant install pgvector on windows
@ 2025-07-17 02:20 ` "jyc939841799 (@jyc939841799)" <noreply+jyc939841799@github.com>
  10 siblings, 0 replies; 12+ messages in thread

From: jyc939841799 (@jyc939841799) @ 2025-07-17 02:20 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

可δ»₯δΊ†οΌŒδ½Ώη”¨ x64 Native Tools Command Prompt for VS 2022 θΏ›θ‘ŒηΌ–θ―‘ζˆεŠŸδΊ†οΌŒθ°’θ°’ε€§η₯žγ€‚

^ permalink  raw  [nested|flat] 12+ messages in thread

* Re: [pgvector/pgvector] issue #870: cant install pgvector on windows
@ 2025-12-23 11:50 ` "tanmayaBiswalOdiware (@tanmayaBiswalOdiware)" <noreply+tanmayaBiswalOdiware@github.com>
  10 siblings, 0 replies; 12+ messages in thread

From: tanmayaBiswalOdiware (@tanmayaBiswalOdiware) @ 2025-12-23 11:50 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

#

> so what i did to solve the above error is I had to use the x64 Native Tools Command Prompt specifically
> 
> so i searched for "x64 Native Tools Command Prompt for VS 2022" in the Start menu then opened it and i ran these commands
> 

This INFO CAME IN CLUTCH. What the heck is MS doing with 5 command prompt when they have created Powershell to kill CMD. So stupid. 

But yes, this "x64 Native Tools Command Prompt for VS 2022" is what we need to compile and install pgvector on windows. I did on Win10. Should apply the same for Windows 11.



^ permalink  raw  [nested|flat] 12+ messages in thread

* Re: [pgvector/pgvector] issue #870: cant install pgvector on windows
@ 2026-06-17 08:16 ` "BBiswal-Git (@BBiswal-Git)" <noreply+BBiswal-Git@github.com>
  10 siblings, 0 replies; 12+ messages in thread

From: BBiswal-Git (@BBiswal-Git) @ 2026-06-17 08:16 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

I have followed all mentioned steps, but I am still getting the below error, while executing the command "nmake /F Makefile.win". Can someone please help me.

Microsoft (R) Program Maintenance Utility Version 14.51.36247.0
Copyright (C) Microsoft Corporation.  All rights reserved.

        cl /nologo /I"C:\Program Files\PostgreSQL\18\include\server\port\win32_msvc" /I"C:\Program Files\PostgreSQL\18\include\server\port\win32" /I"C:\Program Files\PostgreSQL\18\include\server" /I"C:\Program Files\PostgreSQL\18\include"   /O2 /fp:fast /c src\hnswvacuum.c /Fosrc\hnswvacuum.obj
hnswvacuum.c
src\hnswvacuum.c(52): error C2198: 'void vacuum_delay_point(bool)': too few arguments for call
src\hnswvacuum.c(348): error C2198: 'void vacuum_delay_point(bool)': too few arguments for call
src\hnswvacuum.c(460): error C2198: 'void vacuum_delay_point(bool)': too few arguments for call
NMAKE : fatal error U1077: 'cl /nologo /I"C:\Program Files\PostgreSQL\18\include\server\port\win32_msvc" /I"C:\Program Files\PostgreSQL\18\include\server\port\win32" /I"C:\Program Files\PostgreSQL\18\include\server" /I"C:\Program Files\PostgreSQL\18\include"   /O2 /fp:fast /c src\hnswvacuum.c /Fosrc\hnswvacuum.obj' : return code '0x2'
Stop.

^ permalink  raw  [nested|flat] 12+ messages in thread

* Re: [pgvector/pgvector] issue #870: cant install pgvector on windows
@ 2026-06-17 08:17 ` "BBiswal-Git (@BBiswal-Git)" <noreply+BBiswal-Git@github.com>
  10 siblings, 0 replies; 12+ messages in thread

From: BBiswal-Git (@BBiswal-Git) @ 2026-06-17 08:17 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

> so what i did to solve the above error is I had to use the x64 Native Tools Command Prompt specifically
> 
> so i searched for "x64 Native Tools Command Prompt for VS 2022" in the Start menu then opened it and i ran these commands
> 
> ```
> set "PGROOT=C:\laragon\bin\postgresql\postgresql-17.5-2"
> cd %TEMP%\pgvector
> nmake /F Makefile.win clean
> nmake /F Makefile.win
> nmake /F Makefile.win install
> ```
> 
> After battling for a whole day and night with pgvector on Windows 11... πŸ₯΅βš”οΈπŸ§ 
> 
> Hooray! It's finally installed successfully! πŸŽ‰πŸ’ͺπŸš€

I have followed all mentioned steps, but I am still getting the below error, while executing the command "nmake /F Makefile.win". Can someone please help me.

Microsoft (R) Program Maintenance Utility Version 14.51.36247.0
Copyright (C) Microsoft Corporation. All rights reserved.

    cl /nologo /I"C:\Program Files\PostgreSQL\18\include\server\port\win32_msvc" /I"C:\Program Files\PostgreSQL\18\include\server\port\win32" /I"C:\Program Files\PostgreSQL\18\include\server" /I"C:\Program Files\PostgreSQL\18\include"   /O2 /fp:fast /c src\hnswvacuum.c /Fosrc\hnswvacuum.obj
hnswvacuum.c
src\hnswvacuum.c(52): error C2198: 'void vacuum_delay_point(bool)': too few arguments for call
src\hnswvacuum.c(348): error C2198: 'void vacuum_delay_point(bool)': too few arguments for call
src\hnswvacuum.c(460): error C2198: 'void vacuum_delay_point(bool)': too few arguments for call
NMAKE : fatal error U1077: 'cl /nologo /I"C:\Program Files\PostgreSQL\18\include\server\port\win32_msvc" /I"C:\Program Files\PostgreSQL\18\include\server\port\win32" /I"C:\Program Files\PostgreSQL\18\include\server" /I"C:\Program Files\PostgreSQL\18\include" /O2 /fp:fast /c src\hnswvacuum.c /Fosrc\hnswvacuum.obj' : return code '0x2'
Stop.

^ permalink  raw  [nested|flat] 12+ messages in thread

* Re: [pgvector/pgvector] issue #870: cant install pgvector on windows
@ 2026-06-19 14:04 ` "bloodykheeng (@bloodykheeng)" <noreply+bloodykheeng@github.com>
  10 siblings, 0 replies; 12+ messages in thread

From: bloodykheeng (@bloodykheeng) @ 2026-06-19 14:04 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

@BBiswal-Git ensure to first set the correct PG ROOT, Thus the path to ur postgre and ensure to do all that using this terminal
`x64 Native Tools Command Prompt for VS 2022` or mai be u have different visual studio version


^ permalink  raw  [nested|flat] 12+ messages in thread

* Re: [pgvector/pgvector] issue #870: cant install pgvector on windows
@ 2026-08-07 13:27 ` "DharaniRamNallapaneni (@DharaniRamNallapaneni)" <noreply+DharaniRamNallapaneni@github.com>
  10 siblings, 0 replies; 12+ messages in thread

From: DharaniRamNallapaneni (@DharaniRamNallapaneni) @ 2026-08-07 13:27 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

Please follow these steps if the issue still not resolved.

search for x64 Native Tools Command Prompt for VS and run it as an Administrator.

C:\Windows\System32>set "PGROOT=C:\Program Files\PostgreSQL\18"
cd pgvector
nmake /F Makefile.win

  Here you can observer vector.dll binary file created.
 src\vector.obj "C:\Program Files\PostgreSQL\18\lib\postgres.lib" /link /DLL /OUT:vector.dll
   Creating library vector.lib and object vector.exp
        copy sql\vector.sql sql\vector--0.8.6.sql
        1 file(s) copied.


nmake /F Makefile.win install

    Here you can observe the copying of the files.
        copy vector.dll "C:\Program Files\PostgreSQL\18\lib"
        1 file(s) copied.
        copy vector.control "C:\Program Files\PostgreSQL\18\share\extension"
        1 file(s) copied.
        copy sql\vector--*.sql "C:\Program Files\PostgreSQL\18\share\extension"
         
        
      copy src\halfvec.h "C:\Program Files\PostgreSQL\18\include\server\extension\vector"
        1 file(s) copied.

       copy src\sparsevec.h "C:\Program Files\PostgreSQL\18\include\server\extension\vector"
        1 file(s) copied.

       copy src\vector.h "C:\Program Files\PostgreSQL\18\include\server\extension\vector"
        1 file(s) copied.


Test it from postgre sql:
  CREATE EXTENSION vector;
  SELECT extname FROM pg_extension;




^ permalink  raw  [nested|flat] 12+ messages in thread


end of thread, other threads:[~2026-08-07 13:27 UTC | newest]

Thread overview: 12+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-07-03 11:45 [pgvector/pgvector] issue #870: cant install pgvector on windows "bloodykheeng (@bloodykheeng)" <noreply+bloodykheeng@github.com>
2025-07-03 11:57 ` "bloodykheeng (@bloodykheeng)" <noreply+bloodykheeng@github.com>
2025-07-03 12:04 ` "bloodykheeng (@bloodykheeng)" <noreply+bloodykheeng@github.com>
2025-07-03 13:48 ` "ankane (@ankane)" <noreply+ankane@github.com>
2025-07-10 11:15 ` "GhosT-FlexAgen (@GhosT-FlexAgen)" <noreply+GhosT-FlexAgen@github.com>
2025-07-15 05:29 ` "renzer19 (@renzer19)" <noreply+renzer19@github.com>
2025-07-17 02:20 ` "jyc939841799 (@jyc939841799)" <noreply+jyc939841799@github.com>
2025-12-23 11:50 ` "tanmayaBiswalOdiware (@tanmayaBiswalOdiware)" <noreply+tanmayaBiswalOdiware@github.com>
2026-06-17 08:16 ` "BBiswal-Git (@BBiswal-Git)" <noreply+BBiswal-Git@github.com>
2026-06-17 08:17 ` "BBiswal-Git (@BBiswal-Git)" <noreply+BBiswal-Git@github.com>
2026-06-19 14:04 ` "bloodykheeng (@bloodykheeng)" <noreply+bloodykheeng@github.com>
2026-08-07 13:27 ` "DharaniRamNallapaneni (@DharaniRamNallapaneni)" <noreply+DharaniRamNallapaneni@github.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox