pglast
pglast copied to clipboard
Cannot install on windows
Windows 10, Python 3.6.
Full output is:
C:\Python36-32\Scripts>python -m pip install pg_query
Collecting pg_query
Using cached pg_query-0.27.tar.gz
Ignoring aenum: markers 'python_version < "3.6"' don't match your environment
Requirement already satisfied: setuptools in c:\python36-32\lib\site-packages (from pg_query)
Installing collected packages: pg-query
Running setup.py install for pg-query ... error
Complete output from command C:\Python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\PAVLO~1.GOL\\AppData\\Local\\Temp\\pip-build-8ph4yow2\\pg-query\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\PAVLO~1.GOL\AppData\Local\Temp\pip-m36oza86-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win32-3.6
creating build\lib.win32-3.6\pg_query
copying pg_query\error.py -> build\lib.win32-3.6\pg_query
copying pg_query\keywords.py -> build\lib.win32-3.6\pg_query
copying pg_query\node.py -> build\lib.win32-3.6\pg_query
copying pg_query\printer.py -> build\lib.win32-3.6\pg_query
copying pg_query\__init__.py -> build\lib.win32-3.6\pg_query
copying pg_query\__main__.py -> build\lib.win32-3.6\pg_query
creating build\lib.win32-3.6\pg_query\enums
copying pg_query\enums\lockoptions.py -> build\lib.win32-3.6\pg_query\enums
copying pg_query\enums\nodes.py -> build\lib.win32-3.6\pg_query\enums
copying pg_query\enums\parsenodes.py -> build\lib.win32-3.6\pg_query\enums
copying pg_query\enums\pg_class.py -> build\lib.win32-3.6\pg_query\enums
copying pg_query\enums\primnodes.py -> build\lib.win32-3.6\pg_query\enums
copying pg_query\enums\__init__.py -> build\lib.win32-3.6\pg_query\enums
creating build\lib.win32-3.6\pg_query\printers
copying pg_query\printers\ddl.py -> build\lib.win32-3.6\pg_query\printers
copying pg_query\printers\dml.py -> build\lib.win32-3.6\pg_query\printers
copying pg_query\printers\sfuncs.py -> build\lib.win32-3.6\pg_query\printers
copying pg_query\printers\__init__.py -> build\lib.win32-3.6\pg_query\printers
running build_ext
error: [WinError 2] The system cannot find the file specified
----------------------------------------
Command "C:\Python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\PAVLO~1.GOL\\AppData\\Local\\Temp\\pip-build-8ph4yow2\\pg-query\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\PAVLO~1.GOL\AppData\Local\Temp\pip-m36oza86-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\PAVLO~1.GOL\AppData\Local\Temp\pip-build-8ph4yow2\pg-query\
I never tried to build it on Windows machines, and the error is quite obscure, so it's not easy for me to help here. Does the compiler toolchain come with make
?
I will try to install it on a VM with Win8 (if it still boot...), and report back.
A very quick inspection suggests that even the underlying libpg_query library isn't easily compilable on Windows: its Makefile relies on GNU make facilities...
Oh, I see now. I'll try to build it using MinGW and will let you know
Nope, the same error. make
present though
Yes, at this point Windows is unfortunately not supported for libpg_query - the error above probably is caused by a compilation error in the C library code itself.
Thank you Lukas! I spent a little on this, but the nmake
that comes with Visual Studio misses lots of GNU make extensions...
I don't know if that will require a complete rewrite; also my Makefile uses some gmake features.
Apart from the makefiles the other issue is that the extracted code from Postgres is currently not supporting Windows.
I've created https://github.com/lfittl/libpg_query/issues/44 to track this on the libpg_query repo itself.