-
Notifications
You must be signed in to change notification settings - Fork 780
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to Build GTSAM Python Wrapper #714
Comments
The CMake error message is helpful here:
Looks like your Anaconda installation is not providing the |
@alliWong you're in luck. Apparently I encountered a similar issue in the past and I upvoted an answer on SO. Sharing it here for your convenience. https://stackoverflow.com/a/38121972/1236990 If you'd like, you can create a PR that adds this info to the README file and we'll gladly review and accept it (plus you get to be a GTSAM contributor!!). 🙂 |
@varunagrawal Thanks for the answer. I did try to follow the suggestion given the link, but I am still unable to build pybind11. I've also manually set the path to PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR, and PYTHON_LIBRARY, so I wasn't too sure if it's due to my Anaconda system or the CMakeList.txt problem... |
You mean the python interpreter, and not Pybind11? You can try looking for those specific CMake files (e.g. use |
Also, what version of CMake are you using? |
Actually, I just reinstalled gtsam and was able to get it compiled working perfectly! |
Thanks for the help and I'll also create a PR :) |
Huh that's interesting. I wonder what the issue was but I'm glad it works out of the box for you now. |
I'm coming across the same issue. I've tried everything mentioned in this thread... no luck. I confirmed I have cmake version 3.10.2, as well as Python 3.6.9 |
alli, what did you mean by 'reinstall GTSAM'? do you just mean you deleted the build folder and started form scratch?
|
That should be sufficient. Please post the full error message. |
Description
I followed the instructions on https://github.com/borglab/gtsam/tree/develop/python but I am unable to successfully
cmake .. -DGTSAM_BUILD_PYTHON=1 -DGTSAM_PYTHON_VERSION=3.x.x
for python 3.9.2, 3.6.10, and 3.8.3.I've also tried building the older version that worked with my acquaintance (4.0.0 and cython)
Steps to reproduce
Expected behavior
Environment
I am using Anaconda, my cmake is up-to date, and I have met the requirements.txt. Weird thing is I am able to import gtsam in python3 terminal.....but I am trying to work on the python-wrapper-project and haven't been able to get it working without the parent gtsam successfully building. I have also tried to cmake with
1.
cmake ..
-DGTSAM_BUILD_PYTHON=1
-DPYTHON_INCLUDE_DIR=$(python -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")
-DPYTHON_LIBRARY=$(python -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))")
-DPYTHON_EXECUTABLE:FILEPATH=
which python
Would appreciate it if I can get any help with this~!
The text was updated successfully, but these errors were encountered: