psycopg-c==3.2.10 package error #11694

Closed
opened 2025-12-29 21:48:41 +01:00 by adam · 7 comments
Owner

Originally created by @ychtourou12-ai on GitHub (Oct 6, 2025).

NetBox Edition

NetBox Community

NetBox Version

v4.4.2

Python Version

3.11

Steps to Reproduce

migrate from 4.4.0 to 4.4.2

when using the command sudo PYTHON=/usr/bin/python3.11 ./upgrade.sh

Expected Behavior

when upgrade and install dependencies

Observed Behavior

Collecting psycopg-c==3.2.10 (from psycopg[c,pool]==3.2.10->-r requirements.txt (line 32))
  Using cached psycopg_c-3.2.10.tar.gz (601 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [21 lines of output]
      /tmp/pip-build-env-xf7m0ek3/overlay/lib/python3.11/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
      !!
      
              ********************************************************************************
              Please consider removing the following classifiers in favor of a SPDX license expression:
      
              License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
      
              See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
              ********************************************************************************
      
      !!
        self._finalize_license_expression()
      running dist_info
      creating /tmp/pip-modern-metadata-_nvch5o0/psycopg_c.egg-info
      writing /tmp/pip-modern-metadata-_nvch5o0/psycopg_c.egg-
Originally created by @ychtourou12-ai on GitHub (Oct 6, 2025). ### NetBox Edition NetBox Community ### NetBox Version v4.4.2 ### Python Version 3.11 ### Steps to Reproduce migrate from 4.4.0 to 4.4.2 when using the command sudo PYTHON=/usr/bin/python3.11 ./upgrade.sh ### Expected Behavior when upgrade and install dependencies ### Observed Behavior ``` Collecting psycopg-c==3.2.10 (from psycopg[c,pool]==3.2.10->-r requirements.txt (line 32)) Using cached psycopg_c-3.2.10.tar.gz (601 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error × Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [21 lines of output] /tmp/pip-build-env-xf7m0ek3/overlay/lib/python3.11/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated. !! ******************************************************************************** Please consider removing the following classifiers in favor of a SPDX license expression: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3) See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. ******************************************************************************** !! self._finalize_license_expression() running dist_info creating /tmp/pip-modern-metadata-_nvch5o0/psycopg_c.egg-info writing /tmp/pip-modern-metadata-_nvch5o0/psycopg_c.egg- ```
adam added the type: bug label 2025-12-29 21:48:41 +01:00
adam closed this issue 2025-12-29 21:48:41 +01:00
Author
Owner

@ychtourou12-ai commented on GitHub (Oct 6, 2025):

i downgrade psycopg-c==3.2.10 to 3.2.9 and it's work with 4.4.2
i don't know

@ychtourou12-ai commented on GitHub (Oct 6, 2025): i downgrade psycopg-c==3.2.10 to 3.2.9 and it's work with 4.4.2 i don't know
Author
Owner

@jnovinger commented on GitHub (Oct 6, 2025):

@ychtourou12-ai , it looks like the output you pasted is cut off. Any chance you could provide the rest of that?

@jnovinger commented on GitHub (Oct 6, 2025): @ychtourou12-ai , it looks like the output you pasted is cut off. Any chance you could provide the rest of that?
Author
Owner

@liqiuchen1988 commented on GitHub (Oct 7, 2025):

@ychtourou12-ai , it looks like the output you pasted is cut off. Any chance you could provide the rest of that?

I've encountered the same problem. Here is my error log:

Collecting psycopg-c==3.2.10 (from psycopg[c,pool]==3.2.10->-r requirements.txt (line 32))
Using cached psycopg_c-3.2.10.tar.gz (601 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [21 lines of output]
/tmp/pip-build-env-dv196esk/overlay/lib/python3.12/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!

      ********************************************************************************
      Please consider removing the following classifiers in favor of a SPDX license expression:

      License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)

      See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
      ********************************************************************************

!!
self._finalize_license_expression()
running dist_info
creating /tmp/pip-modern-metadata-ibkj5p_e/psycopg_c.egg-info
writing /tmp/pip-modern-metadata-ibkj5p_e/psycopg_c.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-modern-metadata-ibkj5p_e/psycopg_c.egg-info/dependency_links.txt
writing top-level names to /tmp/pip-modern-metadata-ibkj5p_e/psycopg_c.egg-info/top_level.txt
writing manifest file '/tmp/pip-modern-metadata-ibkj5p_e/psycopg_c.egg-info/SOURCES.txt'
couldn't run 'pg_config' --includedir: [Errno 2] No such file or directory: 'pg_config'
error: [Errno 2] No such file or directory: 'pg_config'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

@liqiuchen1988 commented on GitHub (Oct 7, 2025): > [@ychtourou12-ai](https://github.com/ychtourou12-ai) , it looks like the output you pasted is cut off. Any chance you could provide the rest of that? I've encountered the same problem. Here is my error log: Collecting psycopg-c==3.2.10 (from psycopg[c,pool]==3.2.10->-r requirements.txt (line 32)) Using cached psycopg_c-3.2.10.tar.gz (601 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error × Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [21 lines of output] /tmp/pip-build-env-dv196esk/overlay/lib/python3.12/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated. !! ******************************************************************************** Please consider removing the following classifiers in favor of a SPDX license expression: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3) See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. ******************************************************************************** !! self._finalize_license_expression() running dist_info creating /tmp/pip-modern-metadata-ibkj5p_e/psycopg_c.egg-info writing /tmp/pip-modern-metadata-ibkj5p_e/psycopg_c.egg-info/PKG-INFO writing dependency_links to /tmp/pip-modern-metadata-ibkj5p_e/psycopg_c.egg-info/dependency_links.txt writing top-level names to /tmp/pip-modern-metadata-ibkj5p_e/psycopg_c.egg-info/top_level.txt writing manifest file '/tmp/pip-modern-metadata-ibkj5p_e/psycopg_c.egg-info/SOURCES.txt' couldn't run 'pg_config' --includedir: [Errno 2] No such file or directory: 'pg_config' error: [Errno 2] No such file or directory: 'pg_config' [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output.
Author
Owner

@jnovinger commented on GitHub (Oct 7, 2025):

This doesn't feel like a bug in NetBox or psycopg-c so much as it indicates your system is missing required PostgreSQL development headers required to compile psycopg-c's C extensions. error: [Errno 2] No such file or directory: 'pg_config' is indicating that pg_config can not be found on your $PATH.

You need to install the PostgreSQL development package for your system. You can find which development packages to install for Debian/Ubuntu in the NetBox install docs, particularly libpqdev. For other OS's, you'll need to install the equivalent development package.

I'm going to close this as intended functionality.

@jnovinger commented on GitHub (Oct 7, 2025): This doesn't feel like a bug in NetBox or psycopg-c so much as it indicates your system is missing required PostgreSQL development headers required to compile `psycopg-c`'s C extensions. `error: [Errno 2] No such file or directory: 'pg_config'` is indicating that `pg_config` can not be found on your `$PATH`. You need to install the PostgreSQL development package for your system. You can find which development packages to install for Debian/Ubuntu in the [NetBox install docs](https://netboxlabs.com/docs/netbox/installation/netbox/#install-system-packages), particularly `libpqdev`. For other OS's, you'll need to install the equivalent development package. I'm going to close this as intended functionality.
Author
Owner

@ychtourou12-ai commented on GitHub (Oct 9, 2025):

and for RHEL system ?

@ychtourou12-ai commented on GitHub (Oct 9, 2025): and for RHEL system ?
Author
Owner

@liqiuchen1988 commented on GitHub (Oct 9, 2025):

and for RHEL system ?

Yes, i am using rhel8.10 .

@liqiuchen1988 commented on GitHub (Oct 9, 2025): > and for RHEL system ? Yes, i am using rhel8.10 .
Author
Owner

@jnovinger commented on GitHub (Oct 9, 2025):

and for RHEL system ?

Unfortunately, we don't have bandwidth to troubleshoot OS-specific installation prerequisites. Please search for the appropriate RHEL package or ask in GitHub Discussions for community help with your specific environment.

@jnovinger commented on GitHub (Oct 9, 2025): > and for RHEL system ? Unfortunately, we don't have bandwidth to troubleshoot OS-specific installation prerequisites. Please search for the appropriate RHEL package or ask in [GitHub Discussions](https://github.com/netbox-community/netbox/discussions/new?category=help-wanted) for community help with your specific environment.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11694