[Jeston Xavier NX Compile librealsense Error] AttributeError: module ‘pyrealsense2‘ has no attribute ‘pipeline‘

Attributeerror: module ‘pyrealsense 2’ has no attribute ‘pipeline’ error Jeston Xavier NX compiles librealsense

Cmake version problem description solution

Attributeerror: module ‘pyralesense2’ has no attribute ‘pipeline’ problem description solution


The problem of compiling realsense SDK using Jeston platform has attracted a lot of attention on GitHub issue, indicating that these problems are common
let’s start with an easy mistake,

Cmake version problem

Problem description

After compilation, (note that the PIP installation method is not suitable for Jeston platform, and pip only stores the precompiled packages of X86 platform)
an error is reported in import pyrealsense, and the module cannot be found


The apt package manager of Ubuntu cannot be upgraded to the latest version of cmake and needs to be recompiled. This is a big problem. You need to update cmake to 3.12 + before it can work normally. The steps are as follows:
first check your cmake Version (my version is normal)

if the version is too low, compile the new version of cmake yourself (it may be bad if it is too new).
note that the online tutorial will let you uninstall cmake in the current system, that is, execute the following instructions:

sudo apt-get autoremove cmake

Do not do this. This operation will uninstall all cmake compiled programs. For example, if you have installed the ROS system in your computer, you will be killed
cmake can directly overwrite the old version with the new version without uninstalling the old version

1.wget http://www.cmake.org/files/v3.13/cmake-3.13.0.tar.gz
2. tar xpvf cmake-3.13.0.tar.gz cmake-3.13.0/
3. cd cmake-3.13.0/
4. ./bootstrap --system-curl
5. make -j6
6. echo 'export PATH=/home/nvidia/cmake-3.13.0/bin/:$PATH' >> ~/. bashrc
7. source ~/.bashrc


AttributeError: module ‘pyrealsense2’ has no attribute ‘pipeline’

Problem description

Import pyrealsense2 does not report an error
but we generally only do this. It is considered that our compilation has been completed and the test has passed. In fact, there is no attributeerror when actually using the function of pyrealsense2: module ‘pyrealsense2’ has no attribute ‘pipeline’ error


Find these three files (the path and file name may be different with your environment)


Copy them to the location of your script
no error is reported

I know this method can not solve this problem gracefully
I remember solving this problem with raspberry pie 4B before, but I forgot.


My cmake parameter

cmake ../ 

It should be noted that force_ RSUSB_ Backend, you’d better turn it on. There may be some problems. I forgot where I saw it
and import_ DEPTH_ CAM_ FW, update the firmware. It is recommended to close it, because the latest firmware file will be downloaded during cmake. We all know the current network situation. The probability is not moving. Don’t toss around here. Just update the firmware on the PC.

Complete parameter table: please refer to this table to determine the parameters to be filled in

Read More: