question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[OTHER] libcap development headers required for python-prctl

See original GitHub issue

Running the installation commands in the README yields an error when attempting to install the python-prctl dependency:

Collecting python-prctl
  Using cached python-prctl-1.8.1.tar.gz (28 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      You need to install libcap development headers to build this module
      [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.

This can be solved by installing the libcap development headers. It might be worth including this in the README installation instructions, changing this:

sudo apt install -y python3-libcamera python3-kms++

to:

sudo apt install -y python3-libcamera python3-kms++ libcap-dev

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

2reactions
davidplowmancommented, Sep 6, 2022

The Lite version of the OS doesn’t include Qt or OpenGL, so it’s still quite small (and those features of Picamera2 won’t work unless you fetch those dependencies explicitly).

I would also caution a bit about updating Picamera2 on the fly. libcamera doesn’t have a stable API yet so it’s very easy for libcamera and Picamera2 to get out of sync. In fact we’ve just been through another bout of this (bugs to do with “Jpeg” and “Sycc”) and it’s just pain all round. If you can stick to sudo apt upgrade then you’ll always get packages that work together.

1reaction
davidplowmancommented, Sep 1, 2022

Or is it related to the fact that you were installing prctl with pip? I generally have more trouble with pip because stuff tends not to be available pre-compiled which causes all sorts of headaches. Does installing from apt work correctly for you? This is normally what I would recommend.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Welcome to python-prctl's documentation! - PythonHosted.org
Before you try to install python-prctl, you will need to install the following: gcc; libc development headers; libcap development headers.
Read more >
seveas/python-prctl: Wrapping prctl for python - GitHub
... Before installing python-prctl, you need GCC, libc headers and libcap headers. On Debian/Ubuntu: $ sudo apt-get install build-essential libcap-dev On ...
Read more >
python-prctl - PyPI
Python (ic) interface to the linux prctl syscall.
Read more >
WRN Install python-prctl so that processes can be cleaned ...
I need to use Python 3.7 for my work, so I installed: sudo apt-get install python3.7-dev libcap-dev python3-setuptools.
Read more >
python-prctl - Python Package Health Analysis - Snyk
Before installing python-prctl, you need GCC, libc headers and libcap headers. On Debian/Ubuntu: $ sudo apt-get install build-essential libcap-dev.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found