Open BRUCH05 opened 2 days ago
ERRATUM :
The error you are encountering is related to building the psycopg2
package, a PostgreSQL adapter for Python.
Please read the current PR #7. I suppose it is related.
Here is the translation :
In production, there are inconsistencies in the installation method.
The credentials for the first account are not specified, I’ve added them. The primary key for the first user is pk=1, I’ve made the necessary correction. Installing psycopg via requirements.txt throws an exception (SEGMENTATION FAULT) when loading pages; manually installing it without the wheel, using the binaries, simply solves the problem, so I’ve corrected the installation document. => We could perhaps directly correct the requirements.txt. The structure of rc.local wasn’t clear, and it was missing the step to make it executable.
Hello
Thx for your quick answer.
Please found my answers in red below. The issue is still present.
Best regards
C. BRUGEL
IT MANAGER – Aeroclub Brocard – Etampes – France
De : Mael Lacour @.> Envoyé : jeudi 17 octobre 2024 15:45 À : borgia-app/Borgia-docs @.> Cc : BRUCH05 @.>; Author @.> Objet : Re: [borgia-app/Borgia-docs] Issue with "pip3 install -r requirements/prod.txt " (Issue #9)
Here is what ChatGpt is saying, after providing some more context information :
The error you are encountering is related to building the psycopg2 package, a PostgreSQL adapter for Python. The issue seems to stem from the fact that the source code is not compatible with your current Python or PostgreSQL versions.
Here are some potential causes:
Python 3.10.12 (main, Sep 11 2024, 15:47:36) [GCC 11.4.0] on linux
psycopg2==2.9.10 ==> Last version installed
PostgreSQL 14.13 (Ubuntu 14.13-0ubuntu0.22.04.1)
psycopg2==2.9.10 ==> Last version installed
Possible fixes:
pip install psycopg2 –upgrade ==> Done
pip install psycopg2-binary ==> Done
sudo apt-get install libpq-dev python3-dev ==> Already done
Issue log.
-DPG_VERSION_NUM=140013 -DHAVE_LO64=1 -I/borgia-app/borgiaenv/include -I/usr/include/python3.10 -I. -I/usr/include/postgresql -I/usr/include/postgresql/14/server -c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-cpython-310/psycopg/psycopgmodule.o -Wdeclaration-after-statement psycopg/psycopgmodule.c: In function ‘psyco_is_main_interp’: psycopg/psycopgmodule.c:689:18: error: invalid use of incomplete typedef ‘PyInterpreterState’ {aka ‘struct _is’} 689 | while (interp->next) | ^~ psycopg/psycopgmodule.c:690:24: error: invalid use of incomplete typedef ‘PyInterpreterState’ {aka ‘struct _is’} 690 | interp = interp->next; | ^~ error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1 [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for psycopg2 Running setup.py clean for psycopg2 Failed to build psycopg2 ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (psycopg2)
Could you try some of these steps and see how it goes ?
— Reply to this email directly, view it on GitHub https://github.com/borgia-app/Borgia-docs/issues/9#issuecomment-2419593159 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AFZZSJ2C73FNPJ43SBS7OBDZ365PRAVCNFSM6AAAAABQDQX2EGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJZGU4TGMJVHE . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AFZZSJ4TLL5UGSTXPHVKEETZ365PRA5CNFSM6AAAAABQDQX2EGWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUQHAH4O.gif Message ID: @. @.> >
Hi, Did you check my updated answer ?
Hello,
During this execution, I get this issue. All the previous commands from production installation tuto works fine. Any idea ?
Thx by advance Regards Christophe
Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 "-DPSYCOPG_VERSION=2.7.6.1 (dt dec pq3 ext lo64)" -DPG_VERSION_NUM=140013 -DHAVE_LO64=1 -I/borgia-app/borgiaenv/include -I/usr/include/python3.10 -I. -I/usr/include/postgresql -I/usr/include/postgresql/14/server -c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-cpython-310/psycopg/psycopgmodule.o -Wdeclaration-after-statement psycopg/psycopgmodule.c: In function ‘psyco_is_main_interp’: psycopg/psycopgmodule.c:689:18: error: invalid use of incomplete typedef ‘PyInterpreterState’ {aka ‘struct _is’} 689 | while (interp->next) | ^~ psycopg/psycopgmodule.c:690:24: error: invalid use of incomplete typedef ‘PyInterpreterState’ {aka ‘struct _is’} 690 | interp = interp->next; | ^~ error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1 [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for psycopg2 Running setup.py clean for psycopg2 Failed to build psycopg2 ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (psycopg2) (borgiaenv) root@test:/borgia-app/Borgia#