setting up D435i to work in Windows 10 and Python 3.7
I am really struggling to get pyrealsense2 working on Python in a Juptyer Notebook. I am running Windows 10 and Python 3.7 and Jupyter Notebokok. The D435i works fine in Windows and the Winbdows viewer software is working OK. I have downloaded the Intel.RealSense.SDK-WIN10-2.38.1.2223. I have also installed the pyrealsense2 in Python. However when I am using Jupyter Notebook and run the following code:-
import pyrealsense2 as rs
I get the error message
DLL load failed while importing pyrealsense2: The specified module could not be found.
I have now wasted three day scouring fourms and trying different solutions to no avail.
It seems the realsense2d.dll and pyrealsense2.pyd included in the SDK are for Python 2.7 which I find unbelieable considering is it no longer support. It looks like I need to use CMake and VS2017 to create the equivelant files for Python3.7 - which again seems unbelievable. I can't event find any clear step by step instruction for this. Help is needed urgently as my projects are being delayed because of this.
-
Hi Lrobinson746 The RealSense Python wrapper can work with Python 3.7. You can install it using PyPi (a "pip install") or build the wrapper from source code with CMake.
Are you familiar with using pip, please?
-
As mentioned in my first comment I have instaled pyrealsense2 successfully in Python 3.7 using the command
pip install pyrealsense2
but still get the error message when trying torun the line in my code
import pyrealsense2 as rs
What am I doing wrong?
Error message
LL load failed while importing pyrealsense2: The specified module could not be found
-
The opening comment does not mention pip.
It may be worth looking at Intel's Jupyter example programs for Python as a reference.
https://github.com/IntelRealSense/librealsense/tree/jupyter/notebooks
If you require further information, I recommend visiting the RealSense GitHub website at the link below and posting there by clicking on the New Issue button.
https://github.com/IntelRealSense/librealsense/issues
Please include the name tag @dorodnic in your message, as Dorodnic the RealSense SDK Manager is the author of the Jupyter example programs and will be best suited to advise you about setting up pyrealsense2 programs in Jupyter.
-
Thanks for your help. I finally realised what was wrong. I was running a jupyter notebook in a python3.7 virtual environment but jupyter was picking up python 3.8. I have now fixed this and have the realsense distance to object sample code running. Once again thanks for your help - I can get now cracking on some deep learning vision projects for robotics.
Please sign in to leave a comment.
Comments
6 comments