-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
AttributeError: module 'pyrealsense2' has no attribute 'pipeline' #6820
Comments
I also have the same issue about pyrealsense2 doesn't seem to be able to find pipeline. I built from source with a jetson nano and compiled with the same python flag. Could it be because of the 2.36.0 version? |
Please try to copy the new library to the same folder of your script to see if help wwppyy |
you can refer to |
I have the same problem and it does not help, I don't think it's generating bindings for python3, even when i tried to force with -DPYTHON_EXECUTABLE. Here are all the files under /usr that contain pyrealsense in their name (used Also I have tried cd into librealsense/build/wrappers/python/ (the build folder which contains pyrealsense2.so, pyrealsense2.so.2.36, pyrealsense2.so.2.36.0) and use python3 and import pyrealsense2, then I got For more information, the system i'm running is on Jetson Nano B01 with Ubuntu 18.04, cmake version 3.10.2 and python3 --version is 3.6.9 |
I found an issue with the installer failing to copy the correct Try copying this file in the repo to the directory with the installed .so files, in your case |
Im having this exact same issue on a jetson xavier. I tried coping the init.py, librealsense2.so and pyrealsense2.cpython-36m-aarch64-linux-gnu.so to the same folder where my scripts are, but I get the error: ModuleNotFoundError: No module named 'pyrealsense2.pyrealsense2 When I do the same without coping the __init__py I get AttributeError: module 'pyrealsense2' has no attribute 'pipeline' Any known solution to this? Edit: I get the same "ModuleNotFoundError: No module named 'pyrealsense2.pyrealsense2" when trying to install from the setup.py using bdist_wheel so I guess the problem is the init.py |
When I built v2.36.0 for Jetson Nano like this:
I got no It would be nice to have a fix for this, since v2.34.0 has roughly 1-second lag in the camera image. Right now, the camera is pretty much useless. When I built v2.34.0, I did not need Perhaps you could add the sample on your doc page to your regression test suite, so this doesn't happen again. |
also the raspberry pi does not detect the l515 when I run realsense-viewer |
I tried moving the opencv examples back a folder to the rest of the pyrealsense2 library, but it is now telling me "No module named 'pyrealsense2.pyrealsense2' |
I dont understand what this has to do with our error |
in fact, not much seems to work: |
A friend of mine figured out a hack to get Python 3
Then build from source as usual. We did not use |
I can also confirm that using the CMakeLists.txt from v2.34.0 works, your friend is a hero. Thank you |
using the CMakeLists.txt trick on the rpi4 did not work for me. However, using cmake ../ -DFORCE_RSUSB_BACKEND=true -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=true -DBUILD_GRAPHICAL_EXAMPLES=true |
all I see in rs is :
|
@skywo1f Your result is consistent with using a post-v2.34.0 version of the |
So if I move my scripts into the /librealsense/build/wrappers/python folder, and re-install my opencv then it works. I also had to change the resolution in the example to 1024 by 768 |
@skywo1f Hello , I'm facing the smae problem current and don't know how to fix it . AttributeError: module 'pyrealsense2' has no attribute 'pipeline' I try to put the script in the /home/pi/librealsense/build/wrappers/python/ , like what you do in the end and run it , it seems it can find pipeline , but another problem show up it can't find CV2 pi@raspberrypi:~ $ python3 /home/pi/librealsense/build/wrappers/python/align-depth2color.py Thank you to sharing the info . |
pi@raspberrypi:~ $ python3 /home/pi/librealsense/build/wrappers/python/align-depth2color.py After this problem , I try to reinstall the opencv , and things got solved . Thank you for sharing the repo . |
Hello @RealSenseSupport Best |
I tried with latest build following official docs. Ignore protobuf, cmake and opencv instalation guide from the doc. The problem was if you pip install in ubuntu you have to import it like import pyrealnsense2 as rs . But when u build it from source you have to import it like import pyrealsense2.pyrealsense2 as rs .
Let me know if u have any issue regarding dependencies. |
Yup did work! |
Pyrealsense2 doesnt seem to be able to find pipeline. I am running this on a rpi 4 with 64bit os. I originally tried to run it on the regular 32 bit rasbpian, but apparently the L515 is not compatible with 32 bit operating systems. This error occurs when trying to run the opencv_viewer_example.py script in ~/librealsense/wrappers/python/examples . Had no issues during installation and I compiled librealsense with the python flag. (-DBUILD_PYTHON_BINDINGS:bool=true). Should I have compiled librealsense with any other flags?
The text was updated successfully, but these errors were encountered: