librealsense icon indicating copy to clipboard operation
librealsense copied to clipboard

ImportError: No module named pyrealsense2

Open mikeNike9 opened this issue 8 years ago • 5 comments

Required Info
Camera Model D415
Firmware Version
Operating System & Version Linux ubuntu 16.04LTS
Kernel Version (Linux Only) Linux mikeNike9 4.4.0-109-generic
SDK Version Intel® RealSense™ SDK 2.0

I have followed countless examples including all the directions that have been given inside the issues. issue #793 Followed these commands last week and it successfully worked on another dev machine. I am now trying to do the same with a new machine and I get the follow error. ImportError: No module named pyrealsense2

here is my directory
/librealsense/build/wrappers/python CMakeFiles cmake_install.cmake depth.py Makefile pybackend2.cpython-35m-x86_64-linux-gnu.so pybackend2.cpython-35m-x86_64-linux-gnu.so.2 pybackend2.cpython-35m-x86_64-linux-gnu.so.2.9.1 pyrealsense2.cpython-35m-x86_64-linux-gnu.so pyrealsense2.cpython-35m-x86_64-linux-gnu.so.2 pyrealsense2.cpython-35m-x86_64-linux-gnu.so.2.9.1 third_party

can you please provide some assistance

Thanks bros

mikeNike9 avatar Jan 23 '18 22:01 mikeNike9

Hi @mikeNike9 Are you running python from this directory?

zivsha avatar Jan 24 '18 20:01 zivsha

No I just figured it out actually. I had the wrong directory for anaconda3. Thank you we can close this issue. I ended up add this command on the cmake ..

-DPYTHON_EXECUTABLE=/home/mike/anaconda3/bin/python3

mikeNike9 avatar Jan 24 '18 21:01 mikeNike9

I have also been trying to get pyrealsense2 installed and use it in pycharm, however whenever I try to import pyrealsense in pycharm I get the following error:

ModuleNotFoundError: No module named 'pyrealsense2'

I have the same items in my python wrapper directory- how exactly did you get it to work?

I have read many different issue threads and nothing seems to help

kat-mcg-lin avatar May 27 '19 15:05 kat-mcg-lin

Is there any update about this issue? I am also getting the same error: ModuleNotFoundError: No module named 'pyrealsense2'

asharifara avatar Feb 07 '20 23:02 asharifara

hello, i have a same question as follow, please help me to solove it. thanks. $ python prs2.py Traceback (most recent call last): File "prs2.py", line 1, in import pyrealsense2 as rs File "/home/tt/.local/lib/python3.6/site-packages/pyrealsense2-2.39.0.2342-py3.6-linux-x86_64.egg/pyrealsense2/init.py", line 2, in ModuleNotFoundError: No module named 'pyrealsense2.pyrealsense2'

darmin-hsiung avatar Nov 08 '20 01:11 darmin-hsiung