Can't find pykms import in a docker container on a PI4 #281
-
Hello everyone Please let me know if i'm doing something fundamentally wrong here. I'm trying to take photos using a camera in a docker container on a PI4 using the libcamera stack and picamera2. I have managed to install libcamera and picamera2, but when i import picamera2, i get an import error:
pip cannot find a pykms module and google only seems to bring up this: https://github.com/SystemRage/py-kms - is this it? If not, what is pykms? I have no issues import picamera2 on the PI4 when not running in a docker container but pip doesn't find a pykms module, so i'm stumped. Is it unable to find the module because i'm running in a docker container? Any help appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Hi, the instructions say to do |
Beta Was this translation helpful? Give feedback.
-
@tfinker Thanks for the update and also for the info you posted on the forum. I'm thinking this might make for a useful "application note" that could go in section 9 of the manual. I was wondering if you might be up for writing a short paragraph or two that we could add to the documentation here? On this occasion, not using Ubuntu or Docker I'm not really very well qualified, but if you were able to help us out that would be much appreciated. What do you think? Thanks! |
Beta Was this translation helpful? Give feedback.
-
@davidplowman I would be happy to. Considering the odyssey I went on to get it to work (mostly due to inexperience), I would like to save others some time. There are a few threads knocking about of people trying to get libcamera working in a docker container. I actually found that the python3-libcamera install didn't work when I tried to run picamera2 in the container. I had to build it from source. Of course, there could have been a relatively easy fix for this, but I already had it built from source at the time so just switched back. I will experiment a bit more and adapt what I have done into something reproducible. I'll get back to you soon. |
Beta Was this translation helpful? Give feedback.
-
i find same error No module named 'pykms' how to solve it |
Beta Was this translation helpful? Give feedback.
Hi, the instructions say to do
sudo apt install -y python3-kms++
which is the package you seem to be missing. Are you able to try this?