Skip to content
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

Not able to install pyrealsense2 on Jetson AGX Orin #12112

Closed
sure-explorer opened this issue Aug 17, 2023 · 5 comments
Closed

Not able to install pyrealsense2 on Jetson AGX Orin #12112

sure-explorer opened this issue Aug 17, 2023 · 5 comments

Comments

@sure-explorer
Copy link

Required Info
Camera Model D400
Firmware Version 05.15.00.02
Operating System & Version Linux (Ubuntu 20)
Kernel Version (Linux Only) 5.10.104-tegra
Platform NVIDIA Jetson
SDK Version 2.39.0
Language python
Segment others

Issue Description

I try to develop with D400 camera using python in Jetson AGX Orin.

I have followed https://github.com/IntelRealSense/librealsense/blob/master/doc/installation_jetson.md to successfully installed the Librealsense2 SDK in the Jetson Ubuntu20.04 (Building from Source using either RSUSB Backend or Native Backend), and the realsense-viewer works just fine.

Then I followed #6964 (comment) in #11718 to install pyrealsense2, but it end up with "No module named 'pyrealsense2' " in python environment.

When I check the /usr/local/lib/python3.8/, there is not any pyrealsense2 there, what should I do, please?

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Aug 17, 2023

Hi @sure-explorer The 2.39.0 version of librealsense is not suitable for the firmware driver version and Ubuntu version that you have.

Official support for Ubuntu 20.04 Focal was not introduced until librealsense 2.40.0, the version that came after the 2.39.0 one that you are currently using.

Firmware 5.15.0.2 is designed specifically for use with librealsense 2.54.1.

I note though that your librealsense installation and the RealSense Viewer appear to be working with your configuration.


pyrealsense2 should be able to work with Python 3.8 if pyrealsense2 was installed from source code (which it will have been if the #6964 (comment) instructions were used).

When pyrealsense2 is installed from source code, its files should be able to be located within the 'build' directory of your librealsense source code folder, at the path build > wrappers > python

You can check if your defined PYTHONPATH is correct using the command which python3

@sure-explorer
Copy link
Author

Thank you for responding!
Now I can import pyrealsense2 in Python, though things are not so expected.

I download the latest Librealsense2 SDK V 2.54.1, I check that my PYTHONPATH is consistent with - DPYTHON_EXECUTABLE param, and the cmake step and make install step are all good without any visible error or warning output.

However, in #6964 (comment) Step 7."Add these to the end of your .bashrc file":

export PATH=$PATH:~/.local/bin
export PYTHONPATH=$PYTHONPATH:/usr/local/lib
export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python3.6/pyrealsense2

If I understand it correctly, under this path /usr/local/lib/python3.6 there should be a folder named pyrealsense2 after make install, right?
But the fact is that there is no pyrealsense2 in my path.

As you said, its files should be able to be located within the 'build' directory of my librealsense source code folder, at the path build > wrappers > python,
Yes indeed, so I just add this path to my PYTHONPATH, till now everything is OK.

@MartyG-RealSense
Copy link
Collaborator

In the .bashrc lines, python3.6 should be changed to whatever Python 3 version you are using, such as python3.8

@sure-explorer
Copy link
Author

Yes, of course, all the python version in this pipeline are all changed to my python version.

Thank you anyway.

Closing it until next error occurs.

@MartyG-RealSense
Copy link
Collaborator

Thank you @sure-explorer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants