-
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
Ubuntu 20.04 #6568
Comments
Hi @DieProgrammIDE I had an Ubuntu 20.04 case earlier this month. The user successfully installed Librealsense on their 20.04 machine using a "backend" installation process that requires an internet connection but is not dependent on Linux versions or kernel versions and does not need patching. They reported that other than the video stream seeming slightly less stable than the patch-based installation method, there were minimal performance issues as far as they could tell from the testing that they had done. |
I will see into that! Thank you for your fast response |
@MartyG-RealSense I compiled librealsense SDK 2.35.2 and installed in ubuntu20.04 everything is working fine(even though with some glitches that are expected) except that import pyrealsense2 in python is not working? Any information why ? thanks for your help. |
@malapatiravi I just answered another case where a RealSense user had problems installing pyrealsense2 from source on Ubuntu 20.04. My reply is here: |
@MartyG-RealSense I used the following config
|
@MartyG-RealSense Yes. Here is the script i used. ctxt = rs.context() dev_list = ctxt.query_devices() n = len(dev_list) `malz@malz:/mnt/data/eve/camera_issue$ python3 cam1.py malz@malz:/mnt/data/eve/camera_issue$ |
Have you placed copies of the librealsense2.so and pyrealsense2.so files in the same folder where your test script is located? As you are using Python 3, the pyrealsense2.so file may have a longer name than it would in Python 2. Please look in librealsense > build > wrappers > python for this file. Going to this folder should also show whether the Python wrapper has been successfully installed. |
Case closed due to no further comments received. |
Hi @MartyG-RealSense , is there a timeline of officially supporting Ubuntu 20.04? Thanks. |
Hi, $ cmake ../ -DFORCE_RSUSB_BACKEND=true -DBUILD_PYTHON_BINDINGS=true -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=true -DBUILD_GRAPHICAL_EXAMPLES=true Traceback (most recent call last):
ModuleNotFoundError: No module named 'distutils' python3-distutils is installed. What more is needed? |
Hi @hyperdrive On another 20.04 case, a RealSense user posted the 20.04 + Python method that worked for them: |
@MartyG-RealSense Yes, I know. I'm trying to follow this path too, but I fail on the cmake configuration so I thought that maybe this was a known issue which could be easily avoided. Do you have any plans for supporting python 3.8 and ubuntu 20.04? Because it would make the device I bought look so much more attractive. :) I've tweaked the cmake files to work for me so that the python libraries are built, but there are several warnings and even when the system reports the files were properly installed and I can "import pyrealsense2 as rs", the import is empty and doesn't contain attributes.
Python files are installed as : I suppose there are more subtle differences between 2.7 and 3.8 which makes this more difficult. |
Hi @hyperdrive The Python bindings can be built from source code on Python 3.8. I also filed an official feature request with Intel in June 2020 for the creation of PyPi pip install packages for Python 3.8. In regard to official 20.04 support, it will likely be a natural progression for Librealsense to do so at some point but I do not have any information yet about a timeline for that. In the meantime, the RSUSB backend installation method seems to work fine for installing the core Librealsense on its own but seems to encounter complications when building Librealsense with Python binding support using CMake. I believe that in some cases, the Python bindings have installed to Python 2.7 when they should have been installed for Python 3.x. When Python 2 and 3 are both installed on the same computer, you can add a flag to the CMake build statement called -DPYTHON_EXECUTABLE to force building bindings for a specific Python installation. It does not always work, though some have had success with this method. Overall, if your computer / computing device has an x86 or x64 processor (not Arm), it may be easier to build the bindings using Python 3.7 and pip install pyrealsense2 until pip packages for Python 3.8 are available. |
Ok, so I noted that if I copy the so files to the same directory where where my python files are it works. I'm thinking that maybe it wasn't "installed" properly when it was copied to /usr/lib/python3/dist-packages/pyrealsense2 [..] using "make install". Anyway, I can live with moving the so files around to my project directories until I figure out how to make them available globally. |
Thanks very much @hyperdrive for updating about the workaround solution that you found. Good luck! |
Nw. This is what we have open source for, right? Since I will have the same issues getting OpenVINO and Movidius to run it seems I need to setup a dedicated Ubuntu 18 workstation. It's a bit troublesome that Google is pushing for bleeding edge distribution and Intel is using yesterdays platforms. It makes it very complicated to prepare a workstation which can perform experiments across various solutions. Please consider supporting Ubuntu 20.04 ! :) |
Just wondering if 20.04 still requires very special handling for getting up and running with RealSense. There appears to be a somewhat official-looking procedure for setting up on 20.04 here. Have you experienced stability on 20.04 at par with RealSense used on older versions of Ubuntu? |
Hi @matanster Official support for Ubuntu 20 Focal was introduced in librealsense version 2.40.0. The release notes in the link below will hopefully help to answer your questions. https://github.com/IntelRealSense/librealsense/wiki/Release-Notes#release-2400 Installation information for 20.04 have been added to the link that you quoted, which is indeed the official Linux installation documentation. |
Thanks a lot for this extended support. A small note arising in my installation might be that the kernel headers brought in by the apt installation are a newer kernel version than the kernel used on my constantly updating 20.04 as of today. The installation brings in headers for
I will further review the meaning of this difference. |
You are very welcome! If librealsense is built with the RSUSB method mentioned in the release notes then it can be installed without dependence on Linux versions or kernel versions and without the need for patching. |
Thanks for the impeccable support. It seems that after rebooting with today's 20.04 automatic updates having run, 5.4.0-64 is now my kernel version just the same as the header files brought in during the RealSense apt package installation, and my kernel version now has the I understand that without downgrading to the RSUSB mode, there may be some frames loss, but will wait and see whether that is a real issue for my scenario before making a custom build for RSUSB. |
Great to hear that your kernel updated successfully! Feel free to create a new case on this forum if you do have any questions or problems. Good luck! |
Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):
All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)
I have, stupid as i am, updated all my machines to Ubuntu 20.04 and have lots of problems. The Kernel Module from the SDK isn't built because the kernel is newer. Would a Kernel downgrade help, if, to which version?
Also for some Reason the librealsense2.so file in /usr(/local)/lib/ is missing.
Is there anything i could try to fix this?
The text was updated successfully, but these errors were encountered: