|
1 | 1 | # gtsam-project-python |
| 2 | + |
2 | 3 | Project template using GTSAM + python wrapping |
3 | 4 |
|
| 5 | +## PREREQUISITES |
| 6 | + |
| 7 | +- Python 3.6+ is required, since we support these versions. |
| 8 | +- Make the following changes to `GTSAM`: |
| 9 | + |
| 10 | + - Set the CMake flag `GTSAM_INSTALL_CYTHON_TOOLBOX` to `ON` to enable building the cython wrapper. |
| 11 | + - Set the CMake flag `GTSAM_PYTHON_VERSION` to `3`, otherwise the default interpreter will be used. |
| 12 | + - You can do this on the command line as follows: |
| 13 | + |
| 14 | + ```sh |
| 15 | + cmake -GTSAM_INSTALL_CYTHON_TOOLBOX=ON -DGTSAM_PYTHON_VERSION=3 .. |
| 16 | + ``` |
| 17 | + |
| 18 | +## INSTALL |
4 | 19 |
|
5 | | -INSTALL |
6 | | -======= |
7 | | -- Python3 is required |
8 | | -- Make the following changes before build and install: |
9 | | - - Set the CMake flag `GTSAM_INSTALL_CYTHON_TOOLBOX=ON` to enable building the cython wrapper. |
10 | | - - Set the CMake flag `-DGTSAM_PYTHON_VERSION=3`, otherwise the default interpreter will be used. |
11 | | -- Run `cmake ..` |
12 | | -- Run `make install` (may need use sudo), and the wrapped module will be installed to `GTSAM_CYTHON_INSTALL_PATH`, which is |
13 | | -by default: `<your CMAKE_INSTALL_PREFIX>/cython` |
14 | | -- After building and installing gtsam, navigate to `GTSAM_CYTHON_INSTALL_PATH` and run `python setup.py install` |
| 20 | +- In the `example` directory, create the `build` directory and `cd` into it. |
| 21 | +- Run `cmake ..`. |
| 22 | +- Run `make`, and the wrapped module will be installed to a `cython` directory. |
| 23 | +- Navigate to the `cython` directory and run `python setup.py install`. |
15 | 24 |
|
16 | | -For more detailed information, please see |
17 | | -https://github.com/borglab/gtsam/tree/develop/cython |
| 25 | +For more detailed information, please see |
| 26 | +[this link](https://github.com/borglab/gtsam/tree/develop/cython) |
0 commit comments