librealsense icon indicating copy to clipboard operation
librealsense copied to clipboard

Setting-up Python Wrapper

Open idang12 opened this issue 8 years ago • 9 comments

I am using the d400 model, firmware v 05.09.02.00. I am using win10 on a pc and downloaded sdk 2.0 version. I am having trouble getting started with the Python wrapper. When I open the 'cmake-gui' I can't get the 'BUILD_PYTHON_BINDINGS' option and I'm not sure how to get it. I am reffering to the Python wrapper guide that was published here:

https://github.com/IntelRealSense/librealsense/tree/master/wrappers/python#installation

Help would be appreciated.

idang12 avatar Mar 19 '18 13:03 idang12

You need to click "configure" then look under one of the drop downs that are created and you will find this option. Check it, and then click generate

zivsha avatar Mar 19 '18 17:03 zivsha

@zivsha first of all thanks for the response! If I click "configure" it only gives me options for a generator (Visual Studio from various versions and other generators) but the "BUILD_PYTHON_BINDINGS" is not one of them..

idang12 avatar Mar 20 '18 07:03 idang12

Did you select the top level CMakeLists.txt (The one under librealsense/)? If not, try it. Otherwise upload a screenshot and I'll try to understand what you're missing

zivsha avatar Mar 20 '18 10:03 zivsha

@idang12 When you click configure for the first time on a project, CMake asks how you intend to build the project. After you select your preferred compiler/IDE CMake will do the initial configuration, at which point the BUILD_PYTHON_BINDINGS option will appear (potentially in the BUILD dropdown group).

lramati avatar Mar 26 '18 10:03 lramati

@zivsha @lramati Which compiler do I need for python? attached is a screenshot of the error image

idang12 avatar Mar 29 '18 12:03 idang12

You need a compiler that supports C++11. Visual Studio 2008 does not do this. As mentioned in the installation docs, you need Visual Studio 2015 or later. You can download Visual Studio 2017 from Microsoft's website here. After making sure Visual Studio 2015 or later is installed on your computer, delete the CMake cache through the option in the File dropdown, and then configure the project again, selecting the appropriate version of Visual Studio as the Generator.

lramati avatar Apr 03 '18 09:04 lramati

[Realsense Customer Engineering Team Comment] Hi @idang12,

Still need any help for this issue?

[Realsense Customer Engineering Team Comment] Hi @idang12, If no other issue, will close this first.

That is it for now. Thanks for the help!

idang12 avatar May 13 '18 08:05 idang12