-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] ImportError: cannot import name 'Orientation' from 'libcamera' (/usr/lib/python3/dist-packages/libcamera/__init__.py) #939
Comments
Can you say where you have got your version of libcamera from? It sounds to me like you're running something horribly old, and any even vaguely recent version of Picamera2 will never work. If you have a spare SD card, are you able simply to install an up-to-date image to test your camera? Can you say why this doesn't work for you? Thanks. |
@davidplowman |
We always recommend updating libcamera, rpicam-apps and Picamera2 from apt together, because we always ensure they work together. The root of the problem is that libcamera doesn't have a stable API, though I think things are getting better with some of the version numbering, so that's something we could try to improve. I think we'd make Picamera2 have a minimum supported libcamera version. We're unlikely to keep newer versions of Picamera2 backwards compatible with older libcameras unless it's straightforward to do and doesn't complicate code paths internally. |
okay, I could start from scratch (before I was tied to kernel 5.13.32) due to the camera driver issue. Initially it didn't detect the camera again but some of these steps in issue 218 made the trick. setup for reference, after clean image of :
installed;
Ready to start debugging my own app. Thanks!
I'm closing this issue. Thanks for your fast response. |
I tried all above changes mentioned in the last comment by @juanmf , yet i am facing the same issue.
I am using a raspberry pi camera V2 NoIR on raspberry pi 4b With OS as :
|
It sounds as though you may be running an older version of Pi OS and have tried to install a version of Picamera2 that is newer? I would recommend:
|
@davidplowman , I am using Bullseye OS.
I will try with Bookworm OS once and Update. Thanks for the quick response. |
Describe the bug
After upgrading to picamera2-0.3.16 this line causes issues File "/usr/local/lib/python3.9/dist-packages/picamera2/utils.py", line 1,
Added a comment in conflicting commit with more details
To Reproduce
upgrade libcamera & picamera2:
Expected behaviour
normal import behavior
Console Output, Screenshots
Hardware :
Raspberri Pi 4B
uname -a
Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
(same happened on Linux 5.13.32)
The text was updated successfully, but these errors were encountered: