"subprocess-exited-with-error" while installing psycopg_c #5325
-
What happened?command: python -m pip install -r requirements/base.txt && python -m pip install -r requirements/local.txt does not complete successfully, Error: What should've happened instead?complete modules installation on venv Additional detailstried different cookiecutter configurations, ended with the same result (postgres version chosen is 16)
"cookiecutter": {
"project_name": "LawFirmMSS",
"project_slug": "lawfirmmss",
"description": "backend for law firm management system stripped",
"author_name": "Daniel Tumaini",
"domain_name": "example.com",
"email": "mymail@gmail.com",
"version": "0.1.0",
"open_source_license": "MIT",
"username_type": "email",
"timezone": "+3",
"windows": "n",
"editor": "VS Code",
"use_docker": "n",
"postgresql_version": "16",
"cloud_provider": "None",
"mail_service": "Mailgun",
"use_async": "n",
"use_drf": "n",
"frontend_pipeline": "None",
"use_celery": "n",
"use_mailpit": "n",
"use_sentry": "n",
"use_whitenoise": "y",
"use_heroku": "n",
"ci_tool": "Github",
"keep_local_envs_in_vcs": "y",
"debug": "y",
"_template": "https://github.com/pydanny/cookiecutter-django",
"_output_dir": "/home/user/path/to/my/project/dir",
"_repo_dir": "/home/user/.cookiecutters/cookiecutter-django",
"_checkout": null
}, $ cookiecutter https://github.com/cookiecutter/cookiecutter-django project_name [Project Name]: ... |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
@TeleVoyant, did you ensure that you installed all non-Python dependencies like For Debian, these are the dependencies: https://github.com/cookiecutter/cookiecutter-django/blob/master/%7B%7Bcookiecutter.project_slug%7D%7D/utility/requirements-bookworm.apt |
Beta Was this translation helpful? Give feedback.
-
the error occurs as i try to install packages from requirements.txt, can you help me understand how it is related to cookiecutter? (as it completed its prior operation successfully) |
Beta Was this translation helpful? Give feedback.
-
The error occurs because non-Python dependencies needed to install psycopg are missing. psycopg is a library with several parts written in C language, making it possible to use the libpq library in Python; because of this, to install it using pip, you need the C library compilation toolkit (gcc, make, gnu binutils, and others ) and the source headers of the libpq library. To solve the problem, simply install the NixOS equivalent packages, which provide the same software and libraries as the Debian build-essential and libpq-dev packages. |
Beta Was this translation helpful? Give feedback.
The error occurs because non-Python dependencies needed to install psycopg are missing.
psycopg is a library with several parts written in C language, making it possible to use the libpq library in Python; because of this, to install it using pip, you need the C library compilation toolkit (gcc, make, gnu binutils, and others ) and the source headers of the libpq library.
To solve the problem, simply install the NixOS equivalent packages, which provide the same software and libraries as the Debian build-essential and libpq-dev packages.