Python No module named _gtsampy

Issue #316 wontfix
sujunqin created an issue

When I import gtsam, there occurs errors as follows: File "/usr/local/lib/python2.7/dist-packages/gtsam/init.py", line 1, in <module> from _gtsampy import * ImportError: No module named _gtsampy


I had changed CMakeLists.txt to: option(GTSAM_BUILD_PYTHON "Enable/Disable building & installation of Python module" ON) option(GTSAM_ALLOW_DEPRECATED_SINCE_V4 "Allow use of methods/functions deprecated in GTSAM 4" OFF) and run sudo make install success. How can I deal with it? Thanks

Comments (5)

  1. Y Simson

    Another thing to keep in mind is do you have the path to _gtsampy.so on your PYTHONPATH? type in the gtsam directory:

    find . -name _gtsampy*

    you should get:

    ./build/python/gtsam/_gtsampy.so

    ./build/python/handwritten/_gtsampy.so

    If so then you should have no problem to add GTSAM_SOURCE_DIR/build/python/gtsam to your python path

    export PYTHONPATH=$PYTHONPATH:GTSAM_SOURCE_DIR/build/python/gtsam

  2. Mustafa Mukadam

    Hi @sujunqin were you able to try the suggestion above to add gtsampy to your PYTHONPATH and see if it worked?

  3. Mustafa Mukadam

    Thanks for reporting. We are switching to the cython based wrapper for GTSAM 4, so we will not fix this issue for now.

  4. Log in to comment