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

Using Poetry with Nvidia Jetson Orin and pyrealsense2 #13729

Open
cmrooney135 opened this issue Jan 31, 2025 · 2 comments
Open

Using Poetry with Nvidia Jetson Orin and pyrealsense2 #13729

cmrooney135 opened this issue Jan 31, 2025 · 2 comments
Labels

Comments

@cmrooney135
Copy link

I've built a venv in Poetry using python 3.10. The pyproject.toml is pasted below. Using a venv not with poetry the script runs totally fine. We have to use poetry because it's required for a different aspect of our project.

[tool.poetry]
name = "team24"
version = "0.1.0"
description = ""
authors = ["Your Name <[email protected]>"]
readme = "README.md"
package-mode = false

[tool.poetry.dependencies]
python = ">=3.10,<4.0"
pendulum = "^3.0.0"
opencv-python = "^4.11.0.84"
numpy = "^1.26.4"
matplotlib = "^3.5.1"
imutils = "^0.5.4"
pyrealsense2 = "^2.55.1.6486"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

When I attempt to run poetry run python test.py I get this error:

Traceback (most recent call last):
  File "/home/jetson/Desktop/Team24/test.py", line 4, in <module>
    import pyrealsense2 as rs                 # Intel RealSense cross-platform open-source API
  File "/home/jetson/.cache/pypoetry/virtualenvs/team24-BRnwo3QM-py3.10/lib/python3.10/site-packages/pyrealsense2/__init__.py", line 2, in <module>
    from .pyrealsense2 import *
ImportError: /usr/lib/aarch64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /home/jetson/.cache/pypoetry/virtualenvs/team24-BRnwo3QM-py3.10/lib/python3.10/site-packages/pyrealsense2/pyrealsense2.cpython-310-aarch64-linux-gnu.so)

I've tried to update the GLIBCXX to be 3.4.30 but every time I do and I check with strings /usr/lib/aarch64-linux-gnu/libstdc++.so.6 | grep GLIBCXX it only goes up to GLIBCXX_3.4.28 followed by a debug file.

Has anybody else dealt with this issue? I can't seem to figure out why it runs in a separate venv but not in poetry venv. The venv uses python3.8.10 but some of the other packages need a newer version. Anybody have thoughts?

@MartyG-RealSense
Copy link
Collaborator

Hi @cmrooney135 There is very little information available regarding using pyrealsense2 with poetry, unfortunately.

A case from June 2024 at #12811 (comment) took the approach of installing pyrealsense2 and poetry version 1.7.1 within a Docker container, though they installed on a Raspberry Pi board instead of a Jetson.


Researching non-RealSense cases that produced the ``GLIBCXX_3.4.30' not found` error, some people received the message if their computer had a problem with a component called libstdc++6.

An approach that worked for one user was to update libstdc++6 with the commands below.

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install --only-upgrade libstdc++6

Others resolved it by taking the approach of adding the line below to their ~/.bashrc file to preload libstdc++6.

export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6

@MartyG-RealSense
Copy link
Collaborator

Hi @cmrooney135 Do you require further assistance with this case, please? Thanks!

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

No branches or pull requests

2 participants