Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"subprocess-exited-with-error" while installing psycopg_c #5324

Closed
TeleVoyant opened this issue Aug 25, 2024 · 3 comments
Closed

"subprocess-exited-with-error" while installing psycopg_c #5324

TeleVoyant opened this issue Aug 25, 2024 · 3 comments
Labels

Comments

@TeleVoyant
Copy link

TeleVoyant commented Aug 25, 2024

What happened?

command:

python -m pip install -r requirements/base.txt && python -m pip install -r requirements/local.txt 

does not complete successfully, Error:
Screenshot from 2024-08-25 18-50-51

What should've happened instead?

complete modules installation on venv

Additional details

tried different cookiecutter configurations, ended with the same result (postgres version chosen is 16)

  • Host system configuration: Linux hp-zbook-studio 6.6.41 NixOS SMP PREEMPT_DYNAMIC Thu Jul 18 11:21:27 UTC 2024 x86_64 GNU/Linux

    • Version of cookiecutter CLI (get it with cookiecutter --version): Cookiecutter 2.6.0 from /home/me/path/to/my/application/venv/lib/python3.11/site-packages (Python 3.11.9 (main, Apr 2 2024, 08:25:04) [GCC 13.2.0])

    • OS name and version: NixOS 24.05.3164.63d37ccd2d17 (Uakari) x86_64

      On Linux, run

      lsb_release -a 2> /dev/null || cat /etc/redhat-release 2> /dev/null || cat /etc/*-release 2> /dev/null || cat /etc/issue 2> /dev/null

      On MacOs, run

      sw_vers

      On Windows, via CMD, run

      systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
      
      # Insert here the OS name and version
      DISTRIB_CODENAME=uakari
      DISTRIB_DESCRIPTION="NixOS 24.05 (Uakari)"
      DISTRIB_ID=nixos
      DISTRIB_RELEASE="24.05"
      LSB_VERSION="24.05 (Uakari)"
      ANSI_COLOR="1;34"
      BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues"
      BUILD_ID="24.05.3164.63d37ccd2d17"
      
    • Python version, run python3 -V: 3.11.9

    • Docker version (if using Docker), run docker --version:

    • docker compose version (if using Docker), run docker compose --version:

    • ...

  • Options selected and/or replay file:
    On Linux and macOS: cat ${HOME}/.cookiecutter_replay/cookiecutter-django.json
    (Please, take care to remove sensitive information)

"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
  },
Logs:
$ cookiecutter https://github.com/cookiecutter/cookiecutter-django
project_name [Project Name]: ...
@TeleVoyant TeleVoyant added the bug label Aug 25, 2024
@luzfcb
Copy link
Collaborator

luzfcb commented Aug 25, 2024

@TeleVoyant, did you ensure that you installed all non-Python dependencies like libpq-dev and build-essential before running pip?

For Debian, these are the dependencies: https://github.com/cookiecutter/cookiecutter-django/blob/master/%7B%7Bcookiecutter.project_slug%7D%7D/utility/requirements-bookworm.apt

@TeleVoyant
Copy link
Author

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)

@luzfcb
Copy link
Collaborator

luzfcb commented Aug 25, 2024

The error occurs because non-Python dependencies needed to install psycopg are missing.

psycopg is a library that has several parts written in C language to make it possible to use the libpq library in Python, because of this, to install it using pip you need the C library compilation toolkit and the source headers of the libpq library.

@cookiecutter cookiecutter locked and limited conversation to collaborators Aug 25, 2024
@luzfcb luzfcb converted this issue into discussion #5325 Aug 25, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Projects
None yet
Development

No branches or pull requests

2 participants