With Pupil v1.22, built-in support for RealSense cameras was removed. See the release notes for more information. However, the previous code will still function and can be imported as a user plugin into Pupil Capture.
There are two different ways to setup and use this plugin:
1) Running Pupil from source
When running Pupil from source, you will have to install pyrealsense2, normally just with pip install pyrealsense2
into the environment you use to run Pupil. Then download the realsense2_backend.py file from this gist and place it into your pupil source folder in: pupil/pupil_capture_settings/plugins/realsense2_backend.py