Python No module named _gtsampy
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)
-
-
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
-
-
assigned issue to
-
assigned issue to
-
Hi @sujunqin were you able to try the suggestion above to add gtsampy to your PYTHONPATH and see if it worked?
-
- changed status to wontfix
Thanks for reporting. We are switching to the cython based wrapper for GTSAM 4, so we will not fix this issue for now.
- Log in to comment
Did you try in run in ../gtsam/build/python:
python setup.py install
?