I am trying to recompile libcamera, as I will be changing some stuff in it and I would therefore like to install it manually.
The compilation and installation are successful, but I am not able to import it into python.
I know there is a extra package python3-libcamera in the Raspberry Pi OS repos, but I cannot install that e.g. on a Ubuntu workstation.

Is there a way to recreate the python bindings?

RESOLUTION: Thanks @tttapa, I needed to enable the 'pycamera' option in the meson build. Additionally I also needed to add the path it installed to to the PYTHONPATH, as it was not able to import elsewise.
In my case it installed to /usr/local/lib/x86_64-linux-gnu/python3.10/site-packages so I needed to export PYTHONPATH=$PYTHONPATH:/usr/local/lib/x86_64-linux-gnu/python3.10/site-packages

1 Answer 1


You can enable the pycamera option when building libcamera:


  • Thanks, though additionally I also needed to add the directory it was installing to to the "PYTHONPATH", otherwise it wouldn't work.
    – arminveres
    Jul 8 at 9:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.