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.

[BUG] pip install picamera2 ignores NOGUI flag

See original GitHub issue

Describe the bug When trying to install picamera2 via pip without GUI components, I entered the command exactly as indicated in the instructions:

NOGUI=1 pip install picamera2

but the procedure still tries to install PyQt5, which results in the entire process hanging and being killed by the OS.

Collecting PyQt5
  Using cached PyQt5-5.15.7.tar.gz (3.2 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... \ Killed

which means picamera2 is never installed.

To Reproduce See above.

Expected behaviour I’d expect PyQt5 not to be installed at all, given the presence of the NOGUI=1 flag.

Console Output, Screenshots Screen Shot 2022-06-28 at 2 28 19 PM

Hardware : I am using a Raspberry Pi 3B+ with a Camera Module V2 NoIR attached. I’m running Debian GNU/Linux 11 (bullseye) aarch64.

Additional context I don’t know if this is relevant, but you’ll notice from the screenshot that I have set up a conda/mamba environment (micromamba, specifically). The only relevant packages installed via conda that are being used in the picamera2 installation process are python, pip, and numpy; everything else was pip or apt installed as per the instructions. I don’t know if this could potentially cause conflicts–the one in particular I’m concerned with is the fact that OpenCV was installed via apt, but can be imported in the base environment without issues–but I don’t really see how it would cause the wheels to ignore the NOGUI flag.

I saw that #124 seemed to have done exactly this in making PyQt optional, but I can’t seem to get that behavior to work.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9

github_iconTop GitHub Comments

2reactions
jack-solomomocommented, Jun 30, 2022

I think a quick way around this is to install the dependencies directly and then install picamera2 with the --no-deps pip flag. This is working for me (RPi4, raspberry pi os bullseye, connected via ssh and capturing images to file).

pip install PiDNG piexif pillow simplejpeg v4l2-python3 python-prctl
pip install --no-deps picamera2
1reaction
UcefMountacercommented, Jul 6, 2022

I think a quick way around this is to install the dependencies directly and then install picamera2 with the --no-deps pip flag. This is working for me (RPi4, raspberry pi os bullseye, connected via ssh and capturing images to file).

pip install PiDNG piexif pillow simplejpeg v4l2-python3 python-prctl
pip install --no-deps picamera2

thanks, this worked for no GUI installation

(Bullseye, RPI 4, 64 bits)

Read more comments on GitHub >

github_iconTop Results From Across the Web

picamera2 - PyPI
The libcamera-based Python interface to Raspberry Pi cameras, based on the original Picamera library.
Read more >
Accessing the Raspberry Pi Camera with OpenCV and Python
Learn how to access the Raspberry Pi camera and and video stream using Python and OpenCV. Capture images and videos using your Pi,...
Read more >
pip install picamera2 fail due to PyQt5 - Raspberry Pi Forums
Hello, I am trying to use openCV with the new picamera2 library. I am following the instructions on the Github page: ...
Read more >
Error when install picamera on python 3.5.2 windows 10
FileNotFoundError: [Errno 2] No such file or directory: '/proc/cpuinfo'. Cause the file only exists in the linux or unix-like System ...
Read more >
Furniture repair near me - OrlandoStore
We use best technologies, have great experienced craftsman's, proper supply and the latest equipment on hand (Lathe, Mill & Duplicator), allows us to ......
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