uoip / g2opy

Python binding of SLAM graph optimization framework g2o
678 stars 177 forks source link

How to build for Python 2.7 #9

Closed travelbureau closed 6 years ago

travelbureau commented 6 years ago

First, thanks for the awesome work. I'm trying to use this module with Python 2.7. I also have Python 3.5 installed. It seems that no matter what I do pybind is insisting on creating a module for Python3.5. Even if I run python2.7 setup.py install it just copies an object which appears to have been created for 3.5 (g2o.cpython-35m-x86_64-linux-gnu.so). Any hints on how to modify the cmakelists files? Aside: Ubuntu 16.04 with ROS Kinetic installed...

travelbureau commented 6 years ago

Solution is in /path/to/g2opy/build, run: cmake -DPYBIND11_PYTHON_VERSION=2.7 ..