-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
how to install wrapper python on raspberry pi 5 #13373
Comments
Hi @lam26817938 Whilst the librealsense SDK does have support for installing the pyrealsense2 wrapper from Python PyPi wheel packages on Arm archtecture devices with pip install pyrealsense2, this method does not work on Raspberry Pi boards unfortunately and the pyrealsense2 wrapper should be built on Pi from source code instead. The easiest approach may be to install librealsense and pyrealsense2 together at the same time using a pre-made build script provided by the libuvc backend installation method, which works well on Pi. https://github.com/IntelRealSense/librealsense/blob/master/doc/libuvc_installation.md To install pyrealsense2 at the same time as librealsense, line 46 of the 'libuvc_installation.sh' build script should be changed from this:
to this:
https://github.com/IntelRealSense/librealsense/blob/master/scripts/libuvc_installation.sh#L46 |
thanks for your response what should I do if I got this
which raspberry OS do you recommend, seem my current one is too new. |
Buster is the last known Raspberry Pi OS version to work well with RealSense cameras. The next OS after that, Bullseye, had problems with RealSense. The link below has an installation guide for Bookworm and librealsense on Raspberry Pi, though I am not aware of anyone who has tried the guide to confirm if it works. https://couka.de/2024/02/11/librealsense-on-raspberry-pi-2-raspberry-os-bookworm-and-python-3-11/ |
It is installed and can be imported, but it seems it can only be read as a module. When I try to use it, I get this error: ‘module ‘pyrealsense2’ has no attribute ‘XXX.’ |
Also, I got this message when I run |
There is limited information about installing pyrealsense2 for use with Raspberry Pi OS, unfortunately as it is much more common to install it for Ubuntu on Pi, using the libuvc_installation.sh build script mentioned earlier in this discussion. Using vcpkg is not usually necessary in order to install librealsense on a Raspberry Pi. And installing librealsense from vcpkg and then installing it a second time from source code using the instructions under the build pyrealsense Python bindings heading could lead to two separate librealsense installations on the same computer that could conflict with each other. So my advice would be to skip trying to install librealsense with vcpkg, as it would be unnecessary when you have installed it with git clone. I would also recommend adding the CMake build flags below to your CMake build instruction. -DFORCE_LIBUVC=true -DCMAKE_BUILD_TYPE=release So it would look like this:
|
Hi @lam26817938 Do you require further assistance with this case, please? Thanks! |
| Camera Model | D400 |
| Operating System & Version | Linux raspberrypi 6.6.47+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.6.47-1+rpt1 (2024-09-02) aarch64 GNU/Linux |
| Platform | Raspberry Pi 5 |
| SDK Version | 2 |
| Language | python 3.11 |
Issue Description
I want to use Realsense with OpenCV on Raspberry Pi 5. I have tried some guides for the old Raspberry Pi version, but they didn't work for Pi 5. Any solution or suggestions?
This is where I stuck when trying to install from my build
Thanks
The text was updated successfully, but these errors were encountered: