Error: ImportError: No module named pyrealsense2
I followed all instructions and read and tried everything that has already been written about it in the forum.
But I just can't get any further.
I'm almost desperate.
I would like to test the rs-hi-realsense example.
But when importing pyrealsense2 this error always comes up, although I have already tried everything.
I just don't understand where the mistake is.
I am using RaspberryPi4, with Debian Buster.
I use this example here, which I found on the Internet:
import pyrealsense2 as rs
while True:
frames = pipeline.wait_for_frames()
depth_frame = frames.get_depth_frame()
if not depth_frame: continue
width = depth_frame.get_width()
height = depth_frame.get_height()
#print(width,height)
#Calculate distance
dist_to_center = depth_frame.get_distance(int(width/2), int(height/2))
print('The camera is facing an object:',dist_to_center,'meters away')
Many thanks for your help.
I'm really grateful for a helpful tip.
Greetings
Martin
-
I hope that the discussion in the link below about this error with Pyrealsense2 and Raspbian Buster will be helpful.
Please sign in to leave a comment.
Comments
1 comment