View my account

Pip3 error with pyrealsense2

Comments

46 comments

  • MartyG

    Hi, what computer / computing device are you trying to do a pip3 install on please?

    0
    Comment actions Permalink
  • Mhmh6086

    On Odroid with ubuntu 18 , 32 bit .  i used pip install pyrealsense2

    0
    Comment actions Permalink
  • MartyG

    Odroids have ARM processors, and ARM devices will not work with pip install.  This is because the pip packages are designed for x86 and x64 processors, and ARM is not 'x' architecture.

     

    You can build Librealsense from source code and include an instruction to build the Python bindings along with it at the same time.  Here is an example CMake statement that includes the Python bindings.  It uses the "backend" method of installation, which requires an internet connection but is not dependent on Linux versions or kernel versions and does not need to be patched:

    cmake ../ -DFORCE_RSUSB_BACKEND=true -DBUILD_PYTHON_BINDINGS:bool=true -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=true -DBUILD_GRAPHICAL_EXAMPLES=true

     

    Alternatively, if you do not want to rebuild Librealsense then you can build the pyrealsense2 wrapper from source code.

    0
    Comment actions Permalink
  • Mhmh6086

    Hi good afternoon,

    I have ubuntu in external hard and i want to run my code there, but the problem is, it can not detect the realsense camera. would you please let me know if there is any solution for that.

     

    0
    Comment actions Permalink
  • MartyG

    Hi Mhmh6086  Did you build the librealsense SDK on the external hard drive using the Ubuntu on there, please?

    0
    Comment actions Permalink
  • Mhmh6086

    Hi sorry to reply late,  We didnt need the external any more and now need to use the camera in pc with ubuntu 18.04. we have built the librealsense SDK  but the camera cannot be detected . for you to know the same hardware of the camera is working fine with windows pc. 

    I appreciate your help

     

    0
    Comment actions Permalink
  • MartyG

    Hi Mhmh6086  Which method are you using to install librealsense on Ubuntu please - DKMS distribution package or building from source code?  Thanks!

    Package method

    https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md 

    Source code method

    https://github.com/IntelRealSense/librealsense/blob/master/doc/installation.md 

    0
    Comment actions Permalink
  • Mhmh6086

    Hi thank you to reply

    source code method

    0
    Comment actions Permalink
  • Mhmh6086

    actually i tried both

    you tell me  what to do and i do it again .

     

    0
    Comment actions Permalink
  • MartyG

    Hi Mhmh6086  If you experience problems with both of the above methods of building librealsense in Ubuntu then you could try a build method called RSUSB.  It requires an internet connection to carry out the installation process but it is not reliant on Linux versions or kernel versions and does not require patching.  It is therefore an excellent tool for diagnosing whether a problem is related to the Linux kernel if the problem does not occur when using the RSUSB installation method.

    The link below provides instructions for installation using the RSUSB method.  Where the instructions mention 2.36.0, substitute that for whatever librealsense version that you are building from source code.

    https://github.com/IntelRealSense/librealsense/issues/6845#issuecomment-659540316 

     

    You may also find the link below useful when considering the differences between the RSUSB installation method (known previously as libuvc) and conventional kernel-based patching.

    https://github.com/IntelRealSense/librealsense/issues/6368#issuecomment-636320762 

     

    0
    Comment actions Permalink
  • Mhmh6086

    Thank you for the reply ,

    I will try and let you know .

     

    0
    Comment actions Permalink
  • Mhmh6086

    Hi i built it using https://github.com/IntelRealSense/librealsense/issues/6845#issuecomment-659540316  . but still device not connected.

    0
    Comment actions Permalink
  • MartyG

    Is it still the Python wrapper that is not detecting the camera please?  And which model of 400 Series camera are you using?  Thank you.

    0
    Comment actions Permalink
  • Mhmh6086

    I have 435 . i have attached the viewer image .

    0
    Comment actions Permalink
  • Mhmh6086

    Hi

    Would you please help me to solve it .

    Thanks

    0
    Comment actions Permalink
  • MartyG

    Hi Mhmh6086   The Viewer's error message reports that your RealSense installation has udev rules missing.  These are rules that govern the handling of devices.  Can you try the procedure below please?

    STEP ONE  Refresh the local packages cache

    sudo apt-get update

    STEP TWO  Run the command below to install the udev rules

    sudo apt-get upgrade/install librealsense2-udev-rules

    0
    Comment actions Permalink
  • Mhmh6086

    Thank you for the reply .

    the step 2 gives an error :

    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Unable to locate package librealsense2-udev-rules

     

     

    Also the realsense is located in /usr/local/lib/librealsense2.so

     

     

    Thanks in advance for your help :)

    0
    Comment actions Permalink
  • MartyG

    The Unable to locate package error has happened before with the 32-bit version of Ubuntu, if you are still using the 32-bit version that you were at the beginning of this case.

    https://github.com/IntelRealSense/librealsense/issues/2768 

    0
    Comment actions Permalink
  • Mhmh6086

    no at the beginning of this case i was working with another device ,

    now im working with pc x86_64 and the os is  ubuntu 18

    0
    Comment actions Permalink
  • MartyG

    I wonder if it is resulting from your current librealsense installation being built from source code with the backend method according to your post from 4 days ago but the sudo apt-get upgrade command is part of the distribution package installation method.

    You could try going to the librealsense root directory and running the udev script command from the librealsense source-code installation guide:

    ./scripts/setup_udev_rules.sh

    0
    Comment actions Permalink
  • Mhmh6086

    i did : udev-rules successfully installed.

    but still the camera can not be detected

    0
    Comment actions Permalink
  • MartyG

    So you are no longer getting the message in the Viewer about missing udev rules but the camera does not appear in the Viewer?

    0
    Comment actions Permalink
  • Mhmh6086

    yep , no missing rules but no camera

    0
    Comment actions Permalink
  • MartyG

    Thank you very much for your patience.  I would expect a backend type installation to work immediately without camera detection problems such as this.  It is a situation where it is sometimes best to just remove the whole librealsense installation and start again with installation from the beginning. 

    Also, make sure that any previous installations of librealsense are removed, as you reported that you had tried both types of build (package and source code) after switching computers.

    https://support.intelrealsense.com/hc/en-us/community/posts/360048315774/comments/360012860614 

    After that comment, you then performed an RSUSB type installation.  So potentially, three different build methods have been attempted on the same PC.  So you may have better results if there is only one installation (the RSUSB one) on your computer.

    0
    Comment actions Permalink
  • Mhmh6086

    Thank you for your reply .

    No i only have the one installed following https://github.com/IntelRealSense/librealsense/issues/6845#issuecomment-659540316.

    so im going to try again the patching one.

    0
    Comment actions Permalink
  • Mhmh6086

    when i run the code to capture the frame , I got the error :

    pipe_profile=pipeline.start(config)
    RuntimeError: Couldn't resolve requests

    ############################################################################################

    Im working on Ubuntu 18.04.5 LTS (GNU/Linux 5.4.0-47-generic x86_64).

    i followed link :  https://github.com/IntelRealSense/librealsense/blob/master/doc/installation.md#prerequisites.

    im going to specify   the steps that  i have done as follow  :

    1- sudo apt-get install libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev

    2-sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade

    3-git clone https://github.com/IntelRealSense/librealsense.git

    navigate to librealsense root

    4-sudo apt-get install git libssl-dev libusb-1.0-0-dev pkg-config libgtk-3-dev

    5-sudo apt-get install libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev

     6-  ./scripts/setup_udev_rules.sh

      7-   ./scripts/patch-realsense-ubuntu-lts.sh

    8-  mkdir build && cd build

    9-  cmake ../ -DFORCE_RSUSB_BACKEND=true -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=true -DBUILD_GRAPHICAL_EXAMPLES=false

    10-  sudo make uninstall && make clean && make && sudo make install

    0
    Comment actions Permalink
  • MartyG

    If you are using -DFORCE_RSUSB_BACKEND=true then you do not need to do any patching, as the dependencies are installed over an internet connection.  The RSUSB process is described in the instructions in this link:

    https://github.com/IntelRealSense/librealsense/issues/6710#issuecomment-650611442 

    If you intended purposely to build librealsense with the patching method then do not include -DFORCE_RSUSB_BACKEND=true in the CMake build instruction.

    0
    Comment actions Permalink
  • Mhmh6086

    thanks for the reply

    im going to rebuild it with

    cmake ../  -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=true -DBUILD_GRAPHICAL_EXAMPLES=false

    0
    Comment actions Permalink
  • Mhmh6086

    i Did and this is the error and warning :

    2020-09-23 12:12:07,662 WARNING [default] Could not open device command transfer failed to execute bulk transfer, error: RS2_USB_STATUS_IO
    Traceback (most recent call last):
    File "CameraCapture.py", line 17, in <module>
    pipe_profile=pipeline.start(config)
    RuntimeError: No device connected

    0
    Comment actions Permalink
  • MartyG

    Here is a comment relating to a case where this error occurred:

    https://github.com/IntelRealSense/librealsense/issues/4768#issuecomment-526817879 

    0
    Comment actions Permalink

Please sign in to leave a comment.