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

pyrealsense2_net module not found when using pypi package on pc #10218

Closed
elishafer opened this issue Feb 3, 2022 · 5 comments
Closed

pyrealsense2_net module not found when using pypi package on pc #10218

elishafer opened this issue Feb 3, 2022 · 5 comments

Comments

@elishafer
Copy link

elishafer commented Feb 3, 2022

Required Info
Camera Model D435
Firmware Version 05.12.13.50
Operating System & Version Ubuntu 18
Kernel Version (Linux Only) 5.4.0-91-generic
Platform PC
SDK Version 2.50.0
Language python
Segment Robot

Issue Description

I'm trying to run the net_viewer example but get an error when it tries to import pyrealsense2_net module.
ModuleNotFoundError: No module named 'pyrealsense2_net'
These are the versions That I have installed:

  • pyrealsense2 version(from pypi): 2.50.0.3812
  • librealsense version (as part of ros melodic): 2.50.0-1bionic.20211115.141014

Any ideas what I could be doing wrong?

@MartyG-RealSense
Copy link
Collaborator

Hi @elishafer There is a previous report at #9946 of the ModuleNotFoundError: No module named 'pyrealsense2_net' occurring when using the rs_viewer.py example program.

The main list of examples in the Python wrapper documentation provides the description "Shows how to connect to rs-server over network" for the rs_viewer.py example.

You may have already come across rs_server if you have read Intel's white-paper document on the subject of open-source ethernet networking.

https://dev.intelrealsense.com/docs/open-source-ethernet-networking-for-intel-realsense-depth-cameras

If you built librealsense and the RealSense ROS wrapper together from packages with the wrapper's Method 1 instructions then librealsense would not have been built with networking support included. This support can be included in the SDK by building it from source with CMake with the build flag -DBUILD_NETWORK_DEVICE=ON included in the CMake build instruction, as described in #7606 (comment)

Including the -DBUILD_NETWORK_DEVICE=ON build flag in the CMake build instruction when building librealsense from source code causes the 'realsense2-net' module and the 'rs-server' tool to be built.

@Niko-La
Copy link

Niko-La commented Feb 10, 2022

is the wrapper supported for python 3.10? cant find the module on pip? is there clear instructions on building from source if that is the only option?

on windows 10
image

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Feb 10, 2022

Hi @Niko-La At the time of writing this, the most recent Python version that pip install of pyrealsense2 supports is Python 3.9. Further information about this can be found at #10057

Users of newer Python versions than 3.9 should build the wrapper from source code. The simplest approach to buiding from source would be to build librealsense and the Python wrapper together at the same time using the BUILD_PYTHON_BINDINGS CMake build flag with CMake's visual GUI. There is a clearly written tutorial for doing so on Windows 10 at the link below.

https://rahulvishwakarma.wordpress.com/2019/08/17/realsense-435i-depth-rgb-multi-camera-setup-and-opencv-python-wrapper-intel-realsense-sdk-2-0-compiled-from-source-on-win10/

My own guide for building librealsense and the wrapper together from source code with CMake is at #6964 (comment)

If you decide to revert to Python 3.9 so that you can use pip install, a guide for a pip install on Windows that I wrote in the past is at #6402 (comment)

@MartyG-RealSense
Copy link
Collaborator

Hi @Niko-La Do you require further assistance with this case, please? Thanks!

@MartyG-RealSense
Copy link
Collaborator

Case closed due to no further comments received.

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

3 participants